Jump to content

Return a result


The Little Guy

Recommended Posts

How can I get this code to work?

SELECT * FROM users LEFT JOIN pref ON (users.id = pref.owner),friends WHERE 
pref.owner = '45'
AND
(requester = '45' OR receiver = '45')
AND
(requester = '1' OR receiver = '1')

 

It MUST return a result if there is a user, even if the user doesn't have any corresponding pref owner.

 

If their isn't any user, then it shouldn't return a result. The maximum number of results this can and will return is one.

 

So, how can I get a result? The above code should return one result.

Link to comment
https://forums.phpfreaks.com/topic/131926-return-a-result/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.