3raser Posted March 10, 2011 Share Posted March 10, 2011 $verify = mysql_query("SELECT users.id,users.site_url,site.id,site.username FROM records,users WHERE users.id='$id'"); Above, I want to extract users.id,users.site_url from users WHERE users.id='$id', and then extract site.id,site.username where site.username = $username. Is this possible? Or will I have to use multiple queries? Link to comment https://forums.phpfreaks.com/topic/230180-sql-query-help/ Share on other sites More sharing options...
HuggieBear Posted March 10, 2011 Share Posted March 10, 2011 It depends, are the two tables linked in anyway? If they are then it can be done with a simple join. Link to comment https://forums.phpfreaks.com/topic/230180-sql-query-help/#findComment-1185464 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.