remote query in a single insert & update command

mariolu

Member
Licensed User
Longtime User
i am trying to run 2 remote queries, insert and update IN 1 single command.

sql2 = "insert into ....values(.....); update ....SET ... WHERE...;"

ExecuteRemoteQuery2(sql2,value)


the first command gets executed where as the second one does not get executed.


this code work for multiple insert commands, but not for a insert and update command together.


i am calling the folling php code:


$con = mysql_connect($databasehost,$databaseusername,$databasepassword) or die(mysql_error());
mysql_select_db($databasename) or die(mysql_error());
$query = file_get_contents("php://input");
$sth = mysql_query($query);

if (mysql_errno()) {
header("HTTP/1.1 500 Internal Server Error");
echo $query.'\n';
echo mysql_error();
}
else
{

echo $sth;
mysql_close($con);
$file = fopen("Putlog.txt","a")
fwrite($file,date("YmdHis").":".$_SERVER['REMOTE_ADDR'].">".$query."\")
fclose($file)

}
?>

ps remove ";" at the end of line for message purpose only!!!

Please help!!!!
 
Top