I wanted to use the prepared statements of mysqli, but the following
problem occured:
If I just use one parameter everything works fine
$prep = $this->mysqli->prepare('INSERT INTO guestbook (Von, Datum)
VALUES (?, NOW())');
$prep->bind_param('s', $this->Von);
but if I try to use two
$prep = $this->mysqli->prepare('INSERT INTO guestbook (Von, Betreff,
Datum) VALUES (?, ?, NOW())');
echo $prep->param_count; // echos 2
$prep->bind_param('ss', $this->Von, $this->Betreff);
I get an error
Warning: mysqli_stmt::bind_param() : Number of variables doesn't
match number of parameters in prepared statement in ...
Am I doing something wrong or is it a bug or whatever?
php version is 5.1.4 on winXP
Best regards, Ulrich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php