List Info

Thread: Plz help




Plz help
user name
2006-08-30 14:00:26
Hi Guys,
                      I have a serious problem. Please help
me.

    I have to create one cutomer table with following
fields:
1.	Customer ID (primary key)
2.	Customer Name
  and another cutomer_information table with following
fields:
  1.Customer ID (foreign key)
  2.Customer Address
  3.Customer Age
My questions are:
1.	How to do this?
2.	I want to insert one customer's Address corresponding to
his ID.
How to do this?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Php/MySQL Developement" group.
To post to this group, send email to
Php-Mysql-Developementgooglegroups.com
To unsubscribe from this group, send email to
Php-Mysql-Developement-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/Php-Mysql-Developement
-~----------~----~----~----~------~----~------~--~---

Plz help
user name
2006-08-31 11:51:14
Hi

may be this help.

after entring the values to customer table use the function
to get the
last insert ID the syntax is

$customerID=mysql_insert_id();

this will put the customers id to varriable which you can
use to insert
into other table's foreign key.

Hope this is what you want.

Romi


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Php/MySQL Developement" group.
To post to this group, send email to
Php-Mysql-Developementgooglegroups.com
To unsubscribe from this group, send email to
Php-Mysql-Developement-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/Php-Mysql-Developement
-~----------~----~----~----~------~----~------~--~---

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )