Help With SQL JOIN Query - Webmasters - Nairaland
Nairaland Forum › Science/Technology › Webmasters › Help With SQL JOIN Query (1038 Views)
| Help With SQL JOIN Query by emmjohn(op): 8:29pm On Aug 13, 2014 |
I'm trying to create an online booking system for a small inter-city transport company. I have three tables namely bus, route, bus_route bus ----------- id bus_number total_seat Status route ----------- route_id route_number route_from route_to time price status bus_route ----------- id bus_id route_id Please, I need an SQL JOIN query to retrieve the bus number, time, price, and route when status=2 (both bus and route) when you query using route_id |
| Re: Help With SQL JOIN Query by Nobody: 8:43pm On Aug 13, 2014 |
My brain is cracked and needs to be joined with superglue, cant join any query as i dey like this. selectNa wia my brain fit reach be this o jare - make another person try. |
| Re: Help With SQL JOIN Query by emmjohn(op): 10:37am On Aug 26, 2014 |
I finally found a way to do it. This is it below so others can learn. I'm surprised nobody could help. Wonder why sharing knowledge is such a big problem to some of us here.
|
| Re: Help With SQL JOIN Query by emmjohn(op): 10:43am On Aug 26, 2014 |
Having small issues with outputting the array that is returned from the query. This is how the array was created
I want to output it formatted in a table. Please, can anyone be kind enough to show me how to do this. I've tried using a foreach loop but i get Array as output |
| Re: Help With SQL JOIN Query by Nobody: 12:31pm On Aug 26, 2014 |
g |
How To Query The Interswitch Webservice • Why Does This Mysql Query Display "array" Instead Of The Result • Creating Complex / Advanced Search Forms With Sql Queries In Dreamweaver • 2 • 3 • 4
How To Prevent Hired Developers From Stealing Your Source Code • Yahoo Mail Problems. Dear NL Pls Help!!!! • Google Bans ‘explicit’ Adult Content From Blogger Blogs
or die(mysql_error());