CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 passing data to another table

Print topic Send  topic

Author Message
Stew
Posted: 09/09/2002, 8:41 AM

I'll start from the top.

I have an items table and an itemdetails table. The items table has of course an item_id primary key and the itemdetails table also contains the item_id field.

ITEM TABLE

item_id (p key)
item
description
price

ITEMDETAILS TABLE

itemdetails_id (p key)
item_id

When I enter an item into the database, the items table gets populated, but I can't seem to get the item_id value from the items table into the item_id field in the itemsdetail table.

Stew
Lindsay Smith
Posted: 03/19/2003, 10:26 AM

I would like to do the same thing help please!!!
RonB
Posted: 03/19/2003, 11:25 AM

you didn't state what you are using, CC or CCS.

In either case use an after insert event to get the last item id and then execute a query inserting it into the other table.

Ron
Walter
Posted: 03/19/2003, 12:30 PM

Hi Stew,

This might help you. The article is about passing primary keys from one record form to another (passing the primary key, item_id, from the record form entering info into the item table to the record form entering info to the itemdetails table. In this way when you enter this data the primary key from the item table will also be entered into the itemdetails table. Here is the link to the thread.
http://www.gotocode.com/art.asp?art_id=80&

I hope this helps, I know it helped me with the same situation.

Thanks,
Walter

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.