tuxbuddy Posted April 16, 2008 Share Posted April 16, 2008 I have written a query : $result = mysql_query("SELECT incidents.id,incidents.description,users.firstname,users.surname,users.loginname from incidents,users where (incidents.owner_id = users.id) AND (incidents.contact_id = users.id) AND (' . ' select users.id from users where users.loginname='$myusername')"), $link); I have doubt on the line: (' . ' select . Anyone who can help me with this?? Quote Link to comment Share on other sites More sharing options...
zenag Posted April 16, 2008 Share Posted April 16, 2008 i think it might be on this line where (incidents.ownerid = users.id) it must be specified as tablename.users.id not like this... Quote Link to comment Share on other sites More sharing options...
sasa Posted April 16, 2008 Share Posted April 16, 2008 try $result = mysql_query("SELECT incidents.id,incidents.description,users.firstname,users.surname,users.loginname FROM incidents,users WHERE (incidents.owner_id = users.id) AND (incidents.contact_id = users.id) AND (users.loginname='$myusername')"), $link); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.