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? Quote 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. Quote Link to comment https://forums.phpfreaks.com/topic/230180-sql-query-help/#findComment-1185464 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.