Results 1 to 10 of 10
Thread: Help with a join query please
Apr 1, 2011, 16:43 #1
- Join Date
- Oct 2009
- 0 Post(s)
- 0 Thread(s)
Help with a join query please
Im wondering if its possible to do what I want to do all in one query - Im guessing it is because i dont think its that complicated but its too complicated for me to figure out anytime soon.
I've got two tables, equipment and services:
Each equipment may have several services, and these services might be past services or upcoming services. There is a column in the services table `upcoming` which if set to 1 tells you that it is an upcoming service and if 0 a past service.
I want to select all from equipment, and along with each row select the date of last service and the date of the next upcoming service.
table `equipment` `equipmentid`, `name`, `otherdetails` table `services` `serviceid`, `equipmentid`, `date`, `service_description`,`upcoming`
The free online diving community