MySQL Forums
Forum List  »  PHP

PHP Commands out of sync, you can't run this command now
Posted by: Rahul Dubal
Date: September 29, 2008 09:11PM

hi,

I'm using php and mysql veriosn '5.0.51' and we are executing two stored procedures , first stored procedure works fine and the when we execute the second stroed procedure it throws this error.
We are using mysql_connect to DB .
Please help

Here is the connection info
$db = mysql_connect($host,$user,$pass,true,131074) or die("could not connect:".mysql_error($db));
-----------------------------------

$query_statement = "call GetSubState($account_id,'$date_limit','$state')";

$result = mysql_query ( $query_statement );

if (!$result) { die ("GetData : " . mysql_error() . "SQL: $query_statement"); }

$numrows = mysql_num_rows($result,$db);

if ($numrows==0) { return array(); }

for ($i=$start; $i < $numrows; $i++) {
unset($row);
foreach ($fields as $field) {
$row[$field] = mysql_result($result, $i, "$field");
}
$rows[] = $row;
}
mysql_free_result( $result);



Edited 1 time(s). Last edit at 09/29/2008 09:12PM by Rahul Dubal.

Options: ReplyQuote


Subject
Written By
Posted
PHP Commands out of sync, you can't run this command now
September 29, 2008 09:11PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.