Insert and Joins
Posted: Thu Mar 25, 2004 6:39 am
Yes I am new to this and it might quite possibly be quoted somewhere else but lets spin the wheel bob...!
I am looking for some kind of answer to inserting data into two tables.
Say I have two tables and one is called customers:
customer_id
name
surname
address
then i have an invoice table:
invoice_id
invoice_description
amount
customer_id
Now how do I, when inserting a new record into the invoice table, take the customer id from the customer table so that I can match and display the invoice table and the customers table based on these two being joined
I must sound like and idiot, but still...
I am looking for some kind of answer to inserting data into two tables.
Say I have two tables and one is called customers:
customer_id
name
surname
address
then i have an invoice table:
invoice_id
invoice_description
amount
customer_id
Now how do I, when inserting a new record into the invoice table, take the customer id from the customer table so that I can match and display the invoice table and the customers table based on these two being joined
I must sound like and idiot, but still...