note 11640 deleted from mssql_query by jmcastagnetto

From: Date: Thu, 01 Mar 2001 00:42:48 +0000
Subject: note 11640 deleted from mssql_query by jmcastagnetto
Groups: php.notes 
Request: Send a blank email to php-notes+get-11687@lists.php.net to get a copy of this message
Has anyone else noticed that INSERT and UPDATE queries always return false? How are you supposed to know if the query worked? Here is an example: <?php mssql_connect('EPROD_DB_TEST', 'sa', 'freagle'); mssql_select_db('Support'); $Result = mssql_query("UPDATE testforum_seq SET nextval=nextval+1"); if ($Result) { echo("Result is TRUE<BR>"); } else { echo("Result is FALSE<BR>"); } echo '<BR><BR>'; $Result = mssql_query("INSERT testforum_seq values(10)"); if ($Result) { echo("Result is TRUE<BR>"); } else { echo("Result is FALSE<BR>"); } ?> This will print "Result is FALSE" for both queries. Greg

« previous php.notes (#11687) next »