RE: [PHP-DB] multiple queries, one transaction - REWORDED

2005-05-22 Thread Frank Flynn
FROM purchaseItems WHERE orderID = '789' and itemIDs = whatever Good Luck, Frank On May 20, 2005, at 5:02 PM, [EMAIL PROTECTED] wrote: From: mayo [EMAIL PROTECTED] Date: May 20, 2005 4:45:05 PM PDT To: 'Miguel Guirao' [EMAIL PROTECTED], php- [EMAIL PROTECTED] Subject: RE: [PHP-DB] multiple

Re: [PHP-DB] multiple queries, one transaction - REWORDED

2005-05-22 Thread Andrés G . Montañez
Crate an Array, where the Key is the ItemId, and the value is the ItemQty. If the client want to delete an the item, unset the key, if the client wont to add or remove an item quantity, just change the value. Then when the items and quantities are correct, just start transaction begin foreach If

RE: [PHP-DB] multiple queries, one transaction - REWORDED

2005-05-20 Thread mayo
-Original Message- From: Miguel Guirao [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 17, 2005 7:41 PM To: mayo; php-db@lists.php.net Subject: RE: [PHP-DB] multiple queries, one transaction There is a function that gets the last auto increment value for an ID field!! -Original Message- From

[PHP-DB] multiple queries, one transaction

2005-05-17 Thread mayo
I would like to get the itemID number (autoincrement) of the last insert. (Insert order, get last orderID number and use it elsewhere.) I'm having trouble understanding how to do a transaction in mysql/php Code below: $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error

RE: [PHP-DB] multiple queries, one transaction

2005-05-17 Thread mayo
1:30 PM To: 'mayo' Subject: RE: [PHP-DB] multiple queries, one transaction You could always use $orderId = mysql_insert_id($result) to pull the autoinc id that was created from your insert statement... But I think your question revolves more around how do I do a query then how do I pull the id

RE: [PHP-DB] multiple queries, one transaction

2005-05-17 Thread mayo
-db@lists.php.net Subject: RE: [PHP-DB] multiple queries, one transaction Thanks, the $orderId = mysql_insert_id($result) was what I was looking for. But in the long run, I'm still concerned about how to group several queries into one transaction. As for example when one wants to make multiple

RE: [PHP-DB] multiple queries, one transaction

2005-05-17 Thread Miguel Guirao
There is a function that gets the last auto increment value for an ID field!! -Original Message- From: mayo [mailto:[EMAIL PROTECTED] Sent: Martes, 17 de Mayo de 2005 10:27 a.m. To: php-db@lists.php.net Subject: [PHP-DB] multiple queries, one transaction I would like to get the itemID