#31037 [NEW]: MySQLi - bind_param
From: php at trafex dot nl
Operating system: Fedora core 1
PHP version: 5.0.2
PHP Bug Type: MySQLi related
Bug description: MySQLi - bind_param
Description:
------------
I was trying to execute the code that you see below.
But i got the error
"Warning: mysqli_stmt::bind_param() [function.bind-param]: Number of
variables doesn't match number of parameters in prepared statement in..."
So i've tried everything, but still got the same error.
I think this is a bug, and i hope it can be fixed.
I've tried the code with PHP 5.0.2 and PHP 5.0.3 RC1
But still got the same error.
For more info please mail me, thanx!
Reproduce code:
---------------
/* create a prepared statement */
$stmt = $mysqli->prepare("SELECT username FROM pm_users WHERE user_id =
?")
/* bind parameters for markers */
$stmt->bind_param('i', $user_id);
$user_id = 1;
/* execute query */
$stmt->execute();
Expected result:
----------------
Nothing at the moment, just NO error.
Actual result:
--------------
Warning: mysqli_stmt::bind_param() [function.bind-param]: Number of
variables doesn't match number of parameters in prepared statement in
/home/projects/pacman/_public_html/test.php on line 16
--
Edit bug report at http://bugs.php.net/?id=31037&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31037&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31037&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31037&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=31037&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=31037&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=31037&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=31037&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=31037&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=31037&r=support
Expected behavior: http://bugs.php.net/fix.php?id=31037&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=31037&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=31037&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=31037&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31037&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=31037&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=31037&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=31037&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=31037&r=float
MySQL Configuration Error: http://bugs.php.net/fix.php?id=31037&r=mysqlcfg
Thread (24 messages)
- php at trafex dot nl
- georg@php.net#31037 [Opn->Fbk]: MySQLi - bind_param
- php at trafex dot nl#31037 [Fbk->Opn]: MySQLi - bind_param
- georg@php.net#31037 [Opn->Fbk]: MySQLi - bind_param
- php-bugs at lists dot php dot net#31037 [Fbk->NoF]: MySQLi - bind_param
- sniper@php.net#31037 [Opn->Asn]: MySQLi - bind_param
- php at trafex dot nl#31037 [NoF->Opn]: MySQLi - bind_param
- andrey@php.net#31037 [Asn->Fbk]: MySQLi - bind_param
- pavel dot stratil-jun at fenix dot cz#31037 [Com]: MySQLi - bind_param
- joey at alegria dot co dot jp#31037 [Com]: MySQLi - bind_param
- joey at alegria dot co dot jp#31037 [Com]: MySQLi - bind_param
- mczub at newcomo dot pl#31037 [Com]: MySQLi - bind_param
- georg@php.net#31037 [NoF]: MySQLi - bind_param
- skotch at online dot stack dot net#31037 [Com]: MySQLi - bind_param
- putu dot dondo at gmail dot com#31037 [Com]: MySQLi - bind_param
- droppse at wjh dot harvard dot edu#31037 [Com]: MySQLi - bind_param
- cythrawll at cythnet dot com#31037 [Com]: MySQLi - bind_param
- aman dot tur at gmail dot com#31037 [Com]: MySQLi - bind_param
- xpertindia at yahoo dot com#31037 [Com]: MySQLi - bind_param
- xpertindia at yahoo dot com#31037 [Com]: MySQLi - bind_param
- catalin dot tanasescu at filipnet dot ro#31037 [Com]: MySQLi - bind_param
- noadress at noadress dot comBug #31037 [Com]: MySQLi - bind_param
- solve at solve dot comBug #31037 [Com]: MySQLi - bind_param
- rui dot calsaverini at gmail dot comBug #31037 [Com]: MySQLi - bind_param