hey guys
i managed to select from a table that saves my latest posts
but i need to have double condition in selection
here is my code :
$sql_query = "SELECT b.*,u.username AS MY_Sender
FROM TABLE_users u,TABLE_blogs b
Where b.reciever = '0' AND u.user_id = b.sender
UNION
SELECT b.*,u.username AS MY_reciever
FROM TABLE_users u,TABLE_blogs b
Where b.reciever != '0' AND u.user_id = b.reciever
ORDER BY bid DESC
LIMIT 0,7 ";
but MY_reciever is Null and empty
Am i wrong in using UNION for this need ?!