php mysql 4 tables join -


i have 4 tables, in table's 'tbl_order' has single record of each cusotmer. in table's 'tbl_orderdetail' there more 1 services (records) of each customer. in table's 'tbl_services' there more 10 pre-define services. inch table's 'tbl_users' there customer's basic information.

my question : how can fetch data each customer using php mysql. tables details below:

tbl_order:   order_id,order_type,order_date,time,customer_id,booking_type,booking_status,order_no,car_no,booking_date  tbl_orderdetail: id,order_id,service_id       tbl_services :  service_id,s_name,s_price  tbl_users : customer_id ,user_name 

you can join 4 tables using primary key of 1 table forign key of other table , @ of query use order user_name


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -