Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,152,631 members, 7,816,602 topics. Date: Friday, 03 May 2024 at 01:46 PM |
Nairaland Forum / Science/Technology / Webmasters / Help With SQL JOIN Query (906 Views)
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)
Help With SQL JOIN Query by emmjohn: 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: 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: 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 |
(1) (Reply)
YOTUBE Google Adsense Earners! Join Me / Improved Way To Import Blogger To Wordpress / Which Is The Best Mobile App Cross-platform Framework: Ionic Or Mobile-angular?
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 12 |