I am trying to use bind_param method in mysqli howerver I am getting this error:
Warning: mysqli_stmt::bind_param() [function.mysqli-stmt-bind-param]: Number of variables doesn't match number of parameters in prepared statement in
though the number of parametres is OK.
$stmt = $db->prepare('INSERT INTO address (name, street) VALUES (?, ?)');
$stmt->bind_param('ss', $name, $street);
$name = 'My Name';
$street = 'Street 4';
$stmt->execute();
I guess there can be problem with MySQL or PHP versions. I tried recompiling all I could. My current versions:
Mandrake 2005
PHP 5.2.0
MySQL 5.0.19 (couldn't compile PHP with 5.0.27)
phpinfo, mysqli section:
Client API library version 5.0.19
Client API header version 4.1.11
Any ideas? Or am I missing something simple?
Thank you!