You are the right.
Is possible use mysql_insert_id() and it need not stack the queries and
confirm these one by one.
Thanks a lot!!
OKi98 wrote:
> marga wrote:
>
>> Is not possible to use mysql_insert_id() and assing it in a php
>> variable, because
>> mysql_insert_id() is executed after the COM
marga wrote:
Is not possible to use mysql_insert_id() and assing it in a php variable,
because
mysql_insert_id() is executed after the COMMIT, I think.
wrong, it is possible to use mysql_insert_id() during the transaction.
the code should look like this:
mysql_query("start transaction");
if
To accomplish this in the past, it is assumed that the last entered ID is the
highest (since it auto
increments)
To solve this simply, I would use (truncated a bit):
Good luck, let me know if you need any more assistance.
- Nick Stinemates
On Fri, Jan 19, 2007 at 09:38:01AM +1300, Bruce Cow
What about doing all of that in a stored proc and handle the transaction in
there? I've never done that with MySQL (only SQL Server) but I'm assuming it's
possible.
Regards,
Bruce
>>> marga <[EMAIL PROTECTED]> 18/01/2007 10:37:04 p.m. >>>
Hi,
I create a sql variable with php code. Is possib
I think the issue might be that you cannot stack the queries in mysqlyou
can't run both queries separated by a semi-colon. You will likely need to
loop thru the queries and execute them one at a time
Bastien
From: marga <[EMAIL PROTECTED]>
To: php-db@lists.php.net
Subject: [PHP-DB] setti