Foreign Key with two tables
Posted: Thu Jul 13, 2006 1:08 am
I have two tables :: orders and order_details, in db mobile_phones. Let say somebody makes an order, all the information goes to:
order --> ID, user_ID, email, address, postal_code, province, country, date_stamp
order_detail--> ID, FK_order, brand, price, quantity, date_stamp
I wanna display them in a page. ID and FK_order are the FK. I'd like to ave 4-5 orders in 2 page, then there's button next or previous. How do I do that?
$query= sprintf("SELECT * FROM ........?");
order --> ID, user_ID, email, address, postal_code, province, country, date_stamp
order_detail--> ID, FK_order, brand, price, quantity, date_stamp
I wanna display them in a page. ID and FK_order are the FK. I'd like to ave 4-5 orders in 2 page, then there's button next or previous. How do I do that?
$query= sprintf("SELECT * FROM ........?");