From:             dzyszla at dzyszla dot aplus dot pl
Operating system: Linux
PHP version:      5.2.6
PHP Bug Type:     MySQLi related
Bug description:  bind_param and wrong result

Description:
------------
My webserver provider changed the mysqli module to the newest version (I
don't wont, what number). And my code with mysqli_stmt_bind_param dosen't
work correctly, but i get no error message (by mysqli_stmt_error after each
command too). I do something wrong?

Reproduce code:
---------------
$stmt=mysqli_stmt_init($sql);
  if(mysqli_stmt_prepare($stmt,'SELECT COUNT(*) FROM posts WHERE 
`parent`=?'))
  {
   $parent=1;

   if (mysqli_stmt_bind_param($stmt,'i',$parent)) echo 'OK'; else echo
'FALSE';
   if (mysqli_stmt_bind_result($stmt,$enters)) echo 'OK'; else echo
'FALSE';

   if(mysqli_stmt_execute($stmt)) echo 'OK'; else echo 'FALSE';
   if (mysqli_stmt_fetch($stmt)) echo 'OK'; else echo 'FALSE';

   echo $enters;
  }
  mysqli_stmt_close($stmt);


Expected result:
----------------
OKOKOKOK0

Actual result:
--------------
OKOKOKOK161

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

Reply via email to