Hi all,
I have the same problem with PHP 5.x (including lastest php 5.1.2).
The prepared statement does not work with the PHP5's mysqli extention.
<?php $mysqli = new mysqli("localhost", "francois", "", "mydatabase");
if ($stmt = $mysqli->prepare("SELECT colA FROM mytable WHERE colA=?")) {
$val = 'foo'; $stmt->bind_param("s", $val);
$stmt->execute();
$stmt->bind_result($res_val); if ($stmt->fetch()) echo "working! val=$res_val"; $stmt->close(); } $mysqli->close(); ?>
There is no result.
Note that when I execute the same script on Ubuntu but I use a remote mysql server (host on gentoo for instance), this code works.
The problem is realy in MySQL (may be an incompatibility with GCC?).
I have'nt tried official binary or mysql 5.x on drapper.
I' waiting for the next update for now...
Hi all,
I have the same problem with PHP 5.x (including lastest php 5.1.2).
The prepared statement does not work with the PHP5's mysqli extention.
<?php
$mysqli = new mysqli("localhost", "francois", "", "mydatabase");
if ($stmt = $mysqli- >prepare( "SELECT colA FROM mytable WHERE colA=?")) {
$val = 'foo';
$stmt- >bind_param( "s", $val);
if ($stmt->fetch()) echo "working! val=$res_val";
}
$mysqli->close();
?>
There is no result.
Note that when I execute the same script on Ubuntu but I use a remote mysql server (host on gentoo for instance), this code works.
The problem is realy in MySQL (may be an incompatibility with GCC?).
I have'nt tried official binary or mysql 5.x on drapper.
I' waiting for the next update for now...