|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46221 bind_param and wrong result
Submitted: 2008-10-02 18:25 UTC Modified: 2008-11-21 13:34 UTC
Avg. Score:4.8 ± 0.4
Reproduced:3 of 3 (100.0%)
Same Version:4 (133.3%)
Same OS:4 (133.3%)
From: dzyszla at dzyszla dot aplus dot pl Assigned:
Status: No Feedback Package: MySQLi related
PHP Version: 5.2.6 OS: Linux (CentOS 5.2)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
12 + 20 = ?
Subscribe to this entry?

 [2008-10-02 18:25 UTC] dzyszla at dzyszla dot aplus dot pl
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:
  if(mysqli_stmt_prepare($stmt,'SELECT COUNT(*) FROM posts WHERE 

   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;

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-10-02 18:28 UTC] dzyszla at dzyszla dot aplus dot pl
sorry, I replaced expected and actual result above. Now is: OKOKOKOK0, and I expect: OKOKOKOK161
 [2008-10-02 19:50 UTC] dzyszla at dzyszla dot aplus dot pl
(updated information about OS)
(one more correct: I wrote: "don't wont", of course will be: "don't know" ;) eh, my language...)
bind_result work 100% good. Before update this script work correctly.
 [2008-10-26 17:49 UTC]
Please try using this CVS snapshot:
For Windows:

I can't reproduce it.
 [2008-10-27 19:12 UTC] dzyszla at dzyszla dot aplus dot pl
Because problem is on public server, my web service provider sad, that can't test any unofficial version. :(
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Mon Jan 30 22:04:14 2023 UTC