Lone_Ranger Posted December 17, 2013 Share Posted December 17, 2013 $notificationing = mysql_query("SELECT * FROM notifications, inmymind, blogsnotification where nuser='$row[id]' || user='$joysong[friendid]' order by date DESC LIMIT 0,8"); while($notes = mysql_fetch_array($notificationing)) { how would I select from multiple tables? I have different information I need to get from each table but need them listed after. from notifications I want the result where nuser='$row[id]' results to be listed but in that same list I want the results from inmymind, blognotification where user='$joysong[friendid]' I have tried to read up but do not understand any other solutions like Joins etc. is this something possible that I can do? or am I just going out of my mind? Quote Link to comment https://forums.phpfreaks.com/topic/284822-selecting-from-multiple-tables-mysql-php-code/ Share on other sites More sharing options...
Solution Barand Posted December 17, 2013 Solution Share Posted December 17, 2013 Sounds like you need UNIONS, not JOINS Quote Link to comment https://forums.phpfreaks.com/topic/284822-selecting-from-multiple-tables-mysql-php-code/#findComment-1462595 Share on other sites More sharing options...
Lone_Ranger Posted December 18, 2013 Author Share Posted December 18, 2013 awesome unions worked thank you Quote Link to comment https://forums.phpfreaks.com/topic/284822-selecting-from-multiple-tables-mysql-php-code/#findComment-1462704 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.