note 51634 added to function.odbc-autocommit
| From: | Orgied-infoatorgieddotcom at osu1 dot php dot net | Date: | Wed, 06 Apr 2005 06:58:24 +0000 |
| Subject: | note 51634 added to function.odbc-autocommit | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-87557@lists.php.net to get a copy of this message | ||
Hi (i'm belgian then sorry for my english).
I think you can do more simple to check the errors :
$conn = odbc_connect($odbc,$user,$password)
or die($error);
odbc_autocommit($conn, FALSE);
odbc_exec($conn, $query1);
odbc_exec($conn, $query2);
if (!odbc_error())
odbc_commit($conn);
else
odbc_rollback($conn);
odbc_close($conn);
I'm not sure it's better to use odbc_error() than
odbc_error($conn). It seems to be the same result.
----
Manual Page -- http://www.php.net/manual/en/function.odbc-autocommit.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+51634
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+51634&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+51634&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+51634&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+51634&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+51634&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+51634&report=yes
Search -- http://master.php.net/manage/user-notes.php