From:             ludvig dot ericson at gmail dot com
Operating system: Windows XP
PHP version:      5CVS-2006-03-06 (snap)
PHP Bug Type:     MySQLi related
Bug description:  Prepared statements failing with no apparent reason

Description:
------------
When I run this code: http://nopaste.php-q.net/196469 (I removed the LIMIT
on line 48 too)
I get two warnings:

Warning: mysqli_stmt::bind_param() [function.bind-param]: Number of
variables doesn't match number of parameters in prepared statement in
C:\Web\Apache\lnkrec\core\UserSystem.inc.php on line 50

Warning: mysqli_stmt::bind_result() [function.bind-result]: Number of bind
variables doesn't match number of fields in prepared statement. in
C:\Web\Apache\lnkrec\core\UserSystem.inc.php on line 52

I'm thinking this is really weird since the amount of parameters are just
as many as there should be.

I have tested my MySQL query outside PHP, and it works fine
syntactically.

Futhermore, $stmt->param_count is 0.

The Database class is defined as:
http://nopaste.php-q.net/196448
and therefore seemingly transparent in this case.


-- 
Edit bug report at http://bugs.php.net/?id=36631&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=36631&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): 
http://bugs.php.net/fix.php?id=36631&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=36631&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=36631&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=36631&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=36631&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=36631&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=36631&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=36631&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=36631&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=36631&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=36631&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=36631&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=36631&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=36631&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=36631&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=36631&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=36631&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=36631&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=36631&r=mysqlcfg

Reply via email to