Problem with JOIN

From: Date: Thu, 23 May 2002 13:22:50 +0000
Subject: Problem with JOIN
Groups: php.db 
Request: Send a blank email to php-db+get-19375@lists.php.net to get a copy of this message
Hi there, I do want to pull out some data of a user. I did normalize the tables, so there is a table for website, comment ... Now I would like to pull out the users website, comment.. but only if there is one. Unfortunatelly my select stmt returns all 50000 records of the website table: SELECT w.website, c.comment, i.icq, s.signature FROM user_websites LEFT JOIN user_comments AS c ON c.user_id = '3' LEFT JOIN user_icq AS i ON i.user_id = '3' LEFT JOIN user_signature AS s ON s.user_id = '3' LEFT JOIN user_websites AS w ON w.user_id = '3' Somehow my syntax must be wrong, but I can not find the error :-( Maybe one of you guys does know why. Thanx in advance, Andy

« previous php.db (#19375) next »