Two selects - One query

		

$sql = "SELECT * FROM `extra_fields` WHERE uid  = '$user'";


Is it possible to put this SELECT query into the query above?

SELECT * FROM `users` WHERE userID  = '$user'

yep, I did

SELECT users.*
     , extra_fields.* 
  FROM users
LEFT OUTER
  JOIN extra_fields 
    ON extra_fields.uid = users.userID
 WHERE users.userID  = '$user' 

i think oddz just got the column names mixed up

:slight_smile:

Hey thanks, but it doesnt seem to work, doesnt grab any infomation from the database. If I use one of the single queries above in my first post, it will get the data fine.


SELECT
         u.uid
        ,e.userID
        ,...
  FROM
         users u
   LEFT OUTER
   JOIN
         extra_fields e
      ON
         u.uid = e.userID
 WHERE
         u.uid = {$user}