This topic is locked

delete record from 2 tables after adding records to different table

10/16/2007 2:04:22 PM
PHPRunner General questions
J
jetacera author

I am wanting to have a record deleted from a table after the information in it is added to a different table. I'm guessing that I would use some sort of After Add event. Could I get some direction on this?
I am using a master table called cart_master to establish the individual users cart with a child table called cart to which users add items as they browse through the site. When they click to checkout, I want to add the item records from the cart table to the order_details table (a child table of order_summary table) and then delete the related records from the cart table and cart_master table.
Other Issues: I don't want them to have to login to add items to the cart, (I think this can be accomplished by allowing guest users ??? - haven't used that function before - only registered users or no login at all - not the combination) but I do want them to log in to checkout and add the items to the orders table. Would this need to require some kind of event as well?
I've looked over your shopping cart template, and it won't work for this client who has an odd system of products and item numbers, plus I will need to connect it to Authorize.net rather than paypal. Also, I have most of the rest of the project already set up using Phprunner 4.0.
Thanks,
Janet