wanaka
|
Posted: 04/01/2004, 6:03 AM |
|
I have a record form that need to do two insert into the separate table. I would like to use transaction. I am using postgres. How could do this in codecharge studio
|
|
|
lvalverdeb
Posts: 299
|
Posted: 04/01/2004, 6:55 AM |
|
maybe not especific to CCS but I think this link may help you:
http://www.phpbuilder.com/columns/linuxjournal200009.php3
In the article there are two functions cart_new() and cart_add_item() which you may find useful.
Luis
_________________
lvalverdeb
CR, GMT-6
XAMPP/Ubuntu/CCS3.2/4 |
|
|
peterr
Posts: 5971
|
Posted: 04/01/2004, 1:17 PM |
|
The SQL allows inserting into one table at a time. CCS will do this automatically (update one table that you specify), while you can insert records into additional tables in the "After Insert" event.
Our example "Updating Many-to-Many Relations via CheckBox List" may be good to look at as it performs additinal inserts/updates in the After Insert event. And the "ShoppingCart" page in our Store example uses the OnClick event to move items from one table to another. You can basically copy, delete, insert, move records by placing appropriate code in the events.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
|