Jump to content

How to write nested query???


tuxbuddy

Recommended Posts

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??

Link to comment
https://forums.phpfreaks.com/topic/101315-how-to-write-nested-query/
Share on other sites

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);

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.