note 50264 added to function.mssql-query
| From: | gerard at tenyks dot net | Date: | Wed, 23 Feb 2005 11:46:22 +0000 |
| Subject: | note 50264 added to function.mssql-query | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-85420@lists.php.net to get a copy of this message | ||
Warning ! with php 4.3.10, when you use mssql_query to insert or update data, the returned result is
false but the query is really executed.
So you don't know if the query was really executed or not :/
I found a way around this that works for me...
$php_errormsg = "";
$result = mssql_query($sql, $db_conn);
echo $php_errormsg;
If the query has failed $php_errormsg is set to "Query failed"
if its empty. Then as far as i can tell the query executed normally...
This only works if track_errors is enabled.
----
Manual Page -- http://www.php.net/manual/en/function.mssql-query.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+50264
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50264&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50264&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50264&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50264&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50264&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+50264&report=yes
Search -- http://master.php.net/manage/user-notes.php