commands out of sync error[solved]
Posted: Wed Nov 01, 2006 9:24 am
due to company policies, i could not post code but i will try to explain as much as possible
an exact version of the code that is currently running is what i have presented above, i get this following error.
in my code, i am not using the results from the select commands because basically those commands store values into @database_variables which are used later in the update queries.
EDIT: the queries are working fine when they are run using mysql clients/tools but does not run from PHP especially the last update command does not get executed while others are I guess
what do you think is the problem and how can I solve it? Any idea is appreciated.
Code: Select all
$query = '
select query;
select query;
update query;
update query;
'
$conn->multi_query( $query );
$error = $conn->error;
if( $error == "" ){
$query = 'another update query'
$conn->query( $query );
}Code: Select all
Commands out of sync; you can't run this command nowEDIT: the queries are working fine when they are run using mysql clients/tools but does not run from PHP especially the last update command does not get executed while others are I guess
what do you think is the problem and how can I solve it? Any idea is appreciated.