View Single Post
Old 10-31-2004   #2 (permalink)
The Eagle
Moderator
 
Join Date: Jul 2004
Location: Quebec City, Canada
Posts: 51

You'll want to use a query similar to this one:
Code:
SELECT l.id, ... FROM links l LEFT JOIN links_cat c ON c.id = l.cat WHERE ...
Basically, the database server merges the corresponding category row to each link row, and you can then select from the result.

Also, the parts where you reference array elements like $rows[id] are ambiguous in PHP, and I would strongly advise that you put the indices between quotes, like $rows['id'].
The Eagle is offline