Jump to content

Multiple results, want one


Kenny Pollock

Recommended Posts

SELECT v.make, 
v.model, 
v.yr, 
v.amt AS veh_amt, 
v.color, 
v.vin,v.op, 
oh.client_id, 
oh.id AS load_number, 
oh.deldtime, 
oh.pickupdtime, 
oh.dtime, 
oh.status, 
oh.order_uid, 
oh.driver_id, 
cm.name AS client_name, 
oh.instr, 
oo.order_id, 
oo.city AS origin_city, 
oo.company AS ocompany, 
oo.addr AS oaddr, 
oo.zip AS ozip, 
oo.phone AS ophone, 
oo.cell AS ocell, 
oo.wphone AS owphone, 
oo.contact AS ocontact, 
oo.state AS origin_state, 
od.city AS destination_city, 
od.state AS destination_state, 
od.order_id, 
od.company AS dcompany, 
od.addr AS daddr, 
od.zip AS dzip, 
od.phone AS dphone, 
od.cell AS dcell, 
od.wphone AS dwphone, 
od.contact AS dcontact, 
os.id, 
os.status AS order_status, 
dm.id, 
dm.name AS driver_name FROM order_header oh 
INNER JOIN client_master cm ON cm.id = oh.client_id 
INNER JOIN order_origin oo ON oo.order_id = oh.id 
INNER JOIN order_destination od ON od.order_id = oh.id 
INNER JOIN order_status os ON os.id = oh.status 
INNER JOIN driver_master dm ON dm.id = oh.driver_id 
INNER JOIN order_vehicles v ON oh.id = v.order_id 
WHERE oh.id = '12304';

 

If there are multiple vehicles in one order, it repeat the whole order page (the query is outputted in a while() statement). I want to show the multiple vehicles in the single order. How would I go about doing this?

Link to comment
https://forums.phpfreaks.com/topic/96824-multiple-results-want-one/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.