Mysql query

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
Natron797
Forum Newbie
Posts: 1
Joined: Thu Jan 29, 2009 9:07 am

Mysql query

Post by Natron797 »

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
User avatar
jaoudestudios
DevNet Resident
Posts: 1483
Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey

Re: Mysql query

Post by jaoudestudios »

Can you post your query?
Post Reply