Jump to content

Can't figure this query out..


Fenhopi

Recommended Posts

I want my query to return the values where person='$username' and status=0 from one table, and the same in another table.

Here's what I got:

$GetStatus = "SELECT comments.status, friends.status FROM comments, friends WHERE (comments.person='$username' AND comments.status='0') OR (friends.user2='$username' AND friends.status='0')";

 

However it just returns values from different rows where the status is different than 0..

Link to comment
https://forums.phpfreaks.com/topic/240409-cant-figure-this-query-out/
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.