PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Thu Aug 22, 2019 3:14 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: SQL SELECT JOIN HELP
PostPosted: Thu Jan 06, 2005 4:44 am 
Offline
Forum Regular
User avatar

Joined: Tue Sep 23, 2003 11:07 pm
Posts: 769
Location: The Republic of Texas


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 06, 2005 9:18 am 
Offline
Neighborhood Spidermoddy
User avatar

Joined: Mon Mar 29, 2004 4:24 pm
Posts: 31559
Location: Bothell, Washington, USA
http://forums.devnetwork.net/viewtopic. ... 04&start=3


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 06, 2005 11:06 am 
Offline
Forum Regular
User avatar

Joined: Tue Sep 23, 2003 11:07 pm
Posts: 769
Location: The Republic of Texas
Ok, a little bit confusing, but I'll give it a go and see if i can figure it out. Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 06, 2005 11:08 am 
Offline
Neighborhood Spidermoddy
User avatar

Joined: Mon Mar 29, 2004 4:24 pm
Posts: 31559
Location: Bothell, Washington, USA
if you start from the beginning of the thread (remove the start=3 bit) it may explain what's going on a bit more. My explaination of how it works later may shed some light on it too.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 06, 2005 11:26 pm 
Offline
Forum Regular
User avatar

Joined: Tue Sep 23, 2003 11:07 pm
Posts: 769
Location: The Republic of Texas


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 06, 2005 11:29 pm 
Offline
Neighborhood Spidermoddy
User avatar

Joined: Mon Mar 29, 2004 4:24 pm
Posts: 31559
Location: Bothell, Washington, USA


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 06, 2005 11:39 pm 
Offline
Forum Regular
User avatar

Joined: Tue Sep 23, 2003 11:07 pm
Posts: 769
Location: The Republic of Texas


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 06, 2005 11:44 pm 
Offline
Neighborhood Spidermoddy
User avatar

Joined: Mon Mar 29, 2004 4:24 pm
Posts: 31559
Location: Bothell, Washington, USA


Last edited by feyd on Mon Aug 15, 2005 5:53 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 06, 2005 11:48 pm 
Offline
Forum Regular
User avatar

Joined: Tue Sep 23, 2003 11:07 pm
Posts: 769
Location: The Republic of Texas


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 06, 2005 11:50 pm 
Offline
Neighborhood Spidermoddy
User avatar

Joined: Mon Mar 29, 2004 4:24 pm
Posts: 31559
Location: Bothell, Washington, USA


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 06, 2005 11:57 pm 
Offline
Forum Regular
User avatar

Joined: Tue Sep 23, 2003 11:07 pm
Posts: 769
Location: The Republic of Texas


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 07, 2005 12:00 am 
Offline
DevNet Resident
User avatar

Joined: Thu Oct 16, 2003 5:49 pm
Posts: 1972
Location: Manchester (UK)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 07, 2005 12:13 am 
Offline
Neighborhood Spidermoddy
User avatar

Joined: Mon Mar 29, 2004 4:24 pm
Posts: 31559
Location: Bothell, Washington, USA
literally... when someone asked a question here regarding it. Since I knew little about it as well when I started in PHP (about a year ago) I asked questions to a co-worker who knew SQL more than PHP, whereas I could grasp the concepts of PHP very quickly. So we collectively shared some. When I found phpDN I would attempt to solve the problems that people would come here and ask on my own. I spent many hours just screwing around with different queries until they just started to gel. The joins were by far the most difficult.. but once I understood the basic concepts, they became very easy.

If you'd like, I can try to explain them more, but the dirt basics are: LEFT JOIN works in a left handed direction; the tables on the right connect to the tables on the left in some fashion, if at all. RIGHT JOIN works in a right handed direction; the tables on the left connect to the tables on the right in some fashion. Very similar sounding, except that the places that don't connect are nullified. INNER JOIN requires that there is a connection to return a result. NATURAL JOIN has no ON parameters as it'll automatically join any fields named the same between the two tables it's connected with.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group