RE: getting from one table listing from another

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[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 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.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux