Mysql query
Posted: Thu Jan 29, 2009 9:32 am
Hello All,
I am having trouble with a mysql query.
I have 5 tables
jobsmain: Fields - jobid,custid,empid,siteaddress,sitecity,sitestate
empmain: fields - employeeid,empname
jobswo: Fields - WOID,JobID,Installdate,TradeID,WOTypeID,CrewID,WOStatusID
custmain: fields - custid,custfirst,custlast
i have the query working but not the way i would like it too. here is my example of my results.
JOBID Address City State ZIP WOID
2168 121 Willow Dr. SW St. Michael MN 55376 1
2168 121 Willow Dr. SW St. Michael MN 55376 2
what i am trying to do is get it to show just the 1 jobid and then when they click show/hide they will see the work orders below the job. example
JOBID Address City State ZIP
2168 121 Willow Dr. SW St. Michael MN 55376 [link]SHow/Hide[/link]
WOID InStalldate TradeID WOTypeID CrewID WOStatusID
1 1/29/2009 3 2 36 5
2 2/5/2009 2 3 45 3
maybe i am making this harder then it should be. Its got me stumped.
I hope there is enough information here for someone to help me.
Thanks
Natron797
I am having trouble with a mysql query.
I have 5 tables
jobsmain: Fields - jobid,custid,empid,siteaddress,sitecity,sitestate
empmain: fields - employeeid,empname
jobswo: Fields - WOID,JobID,Installdate,TradeID,WOTypeID,CrewID,WOStatusID
custmain: fields - custid,custfirst,custlast
i have the query working but not the way i would like it too. here is my example of my results.
JOBID Address City State ZIP WOID
2168 121 Willow Dr. SW St. Michael MN 55376 1
2168 121 Willow Dr. SW St. Michael MN 55376 2
what i am trying to do is get it to show just the 1 jobid and then when they click show/hide they will see the work orders below the job. example
JOBID Address City State ZIP
2168 121 Willow Dr. SW St. Michael MN 55376 [link]SHow/Hide[/link]
WOID InStalldate TradeID WOTypeID CrewID WOStatusID
1 1/29/2009 3 2 36 5
2 2/5/2009 2 3 45 3
maybe i am making this harder then it should be. Its got me stumped.
I hope there is enough information here for someone to help me.
Thanks
Natron797