[thelist] SQL problem
Jay Blanchard
jay.blanchard at niicommunications.com
Fri Aug 16 09:07:01 CDT 2002
[snip]
PKey ¦ Catagory
-----------------------------------
1 ¦ Music
2 ¦ Humour
3 ¦ Computer stuff
and a second table called FaveList which contains
Primary_ID ¦ pkmatch ¦ Description
----------------------------------------------------------------------------
1 ¦ 1 ¦ Cardiacs Homepage
2 ¦ 1 ¦ Offspring Homepage
3 ¦ 2 ¦ Popbitch
4 ¦ 3 ¦ Evolt
[/snip]
OK, here is some SQL which may work for you (remeber that SELECT * is bad,
you should SELECT specific columns);
SELECT *
FROM Descs d LEFT OUTER JOIN FaveList f
ON d.PKey = f.pkmatch
ORDER BY d.Pkey
I didn't have time to look at the other code, but maybe later.
Jay
***********************************************************
* Texas PHP Developers Conf Spring 2003 *
* T Bar M Resort & Conference Center *
* New Braunfels, Texas *
* San Antonio Area PHP Developers Group *
* Interested? Contact jay.blanchard at niicommunications.com *
***********************************************************
More information about the thelist
mailing list