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

Reply via email to