>From: "Aaron Wolski" <[EMAIL PROTECTED]> Friday, May 21, 2004 12:21 PM > Subject: RE: [PHP-DB] Inventory Management for ecommerce store
> > All cart records are stored to the database with a timestamp. On each > call to the cart_script, I check to see if any records are older than 24 > hours and if they are, I dump the quantity back into inventory and > remove the entry from the DB. If your updates to the inventory counts are in two separate sql statements, then you should use transactions. That's because if I hit the stop or back button, the php script will stop executing, and some of the script and sql won't get executed. So, you may find that you are updating all of the tables when you scan your code, but site visitors can interrupt that process -- especially those that hit back and forward quick. If you're using mysql, you need to use inno_db tables in order to use transactions. --- The future will be better tomorrow --- http://www.spiceplace.com/ ---------------------------------------- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php