RE: [PHP] getting from one table listing from another

2007-08-20 Thread tedd
[snip] However, the LEFT and RIGHT will take me a while to figure out. [/snip] FROM table a LEFT OUTER JOIN table b ON(a.column = b.column) Just follow the order tedd, a is on the left and b is on the right LEFT OUTER - a - b (what may be in a might not be in b) a - b - RIGHT OUTER (what may

Re: [PHP] getting from one table listing from another

2007-08-20 Thread Larry Garfield
On Monday 20 August 2007, tedd wrote: Question -- is it redundant to say: FROM table a LEFT OUTER JOIN table b ON(a.column = b.column) when table a appears first? Wouldn't that be the same as: FROM table a OUTER JOIN table b ON(a.column = b.column) ??? I'm trying to understand why

RE: [PHP] getting from one table listing from another

2007-08-19 Thread tedd
At 6:12 PM -0500 8/18/07, Jay Blanchard wrote: [snip] I know this is kinda crazy but I need it :P I have one table that lists name's and I have another table that has the name's and points I want to know how to list the name's of the first table by the points of the second table [/snip] Not

Re: [PHP] getting from one table listing from another

2007-08-19 Thread Stut
tedd wrote: At 6:12 PM -0500 8/18/07, Jay Blanchard wrote: [snip] I know this is kinda crazy but I need it :P I have one table that lists name's and I have another table that has the name's and points I want to know how to list the name's of the first table by the points of the second table

RE: [PHP] getting from one table listing from another

2007-08-19 Thread Jay Blanchard
[snip] At 6:12 PM -0500 8/18/07, Jay Blanchard wrote: [snip] I know this is kinda crazy but I need it :P I have one table that lists name's and I have another table that has the name's and points I want to know how to list the name's of the first table by the points of the second table [/snip]

Re: [PHP] getting from one table listing from another

2007-08-19 Thread Larry Garfield
On Sunday 19 August 2007, tedd wrote: Not crazy, pretty standard from a database point of view; SELECT a.name, b.points FROM table a LEFT OUTER JOIN table b ON(a.name = b.name) This only works if the name in table a matches a name in table b. Then why use a JOIN? It's my understanding

Re: [PHP] getting from one table listing from another

2007-08-19 Thread tedd
At 12:56 PM -0500 8/19/07, Larry Garfield wrote: On Sunday 19 August 2007, tedd wrote: Wouldn't this be simpler? SELECT a.name, b.points FROM table_name a, table_name_points b WHERE a.name = b.name There are various kinds of JOINs. The most common you'll actually use are INNER JOIN

RE: [PHP] getting from one table listing from another

2007-08-19 Thread Jay Blanchard
[snip] However, the LEFT and RIGHT will take me a while to figure out. [/snip] FROM table a LEFT OUTER JOIN table b ON(a.column = b.column) Just follow the order tedd, a is on the left and b is on the right LEFT OUTER - a - b (what may be in a might not be in b) a - b - RIGHT OUTER (what may be

Re: [PHP] getting from one table listing from another

2007-08-18 Thread Stephen Johnson
You might try sending this to a group that is more orientated towards data basing.. Since that seems to be what your asking about... On 8/18/07 3:53 PM, Nate [EMAIL PROTECTED] wrote: I know this is kinda crazy but I need it :P I have one table that lists name's and I have another table that

RE: [PHP] getting from one table listing from another

2007-08-18 Thread Jay Blanchard
[snip] I know this is kinda crazy but I need it :P I have one table that lists name's and I have another table that has the name's and points I want to know how to list the name's of the first table by the points of the second table [/snip] Not crazy, pretty standard from a database point of