Edit report at http://bugs.php.net/bug.php?id=33787&edit=1

 ID:               33787
 Comment by:       ceza_rapstar_00 at hotmail dot com
 Reported by:      ladoo at gmx dot at
 Summary:          no "out of sync"-error when preparing a statement
 Status:           No Feedback
 Type:             Bug
 Package:          MySQLi related
 Operating System: Linux (x86)
 PHP Version:      5.0.4

 New Comment:

Badly need your help. The fact that an opinion has been widely held is
no evidence whatever that it is not utterly absurd; indeed in view of
the silliness of the majority of mankind, a widespread belief is more
likely to be foolish than sensible. Help me! I find sites on the topic:
Window coverings brackets. I found only this - <a
href="http://window-covering-store.biz/";>window coverings magazine</a>.
Window covering, developing this aggregator matters to opposing more and
more then into a research challenge. Using an fee in the week will
further socialize the free episode, window covering. Waiting for a reply
:cool:, Richelle from Sao.


Previous Comments:
------------------------------------------------------------------------
[2008-02-27 19:41:59] chedi dot toueiti at gmail dot com

see http://www.rooftopsolutions.nl/article/173



it worked for me (but i'm using stored proc), hope it help you

------------------------------------------------------------------------
[2005-07-28 01:00:04] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

------------------------------------------------------------------------
[2005-07-20 16:08:30] tony2...@php.net

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip



------------------------------------------------------------------------
[2005-07-20 15:55:54] ladoo at gmx dot at

Description:
------------
When the result of a statement isn't freed PHP gives an error when
trying to issue a new query. It doesn't so when the new query is
preparing a statement (see reproduce code). Then mysqli::errno and
mysqli::error are empty.



workaround:

use $stmt to decide wheter $stmt = $mysqli->prepare(...) worked not
$mysqli->errno.

Reproduce code:
---------------
<?php

$my = new mysqli("localhost","user","password","db");

$stmta = $my->prepare("SELECT * FROM cms_Site");

$stmta->execute();

$stmtb = $my->prepare("SELECT * FROM cms_Site");

if ($stmtb) {

        echo "prepare succeeded";

} else {

        echo "prepare failed<br />";

        echo "errno: ", $my->errno, "  - error: ", $my->error, "<br />";

}

$x = $my->query("") or die("errno: ".$my->errno."  - error:
".$my->error."<br />");

?>

Expected result:
----------------
prepare failed

errno: 2014 - error: Commands out of sync; you can't run this command
now

errno: 2014 - error: Commands out of sync; you can't run this command
now

Actual result:
--------------
prepare failed

errno: 0 - error:

errno: 2014 - error: Commands out of sync; you can't run this command
now


------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=33787&edit=1

Reply via email to