iversonm Posted October 2, 2008 Share Posted October 2, 2008 hey i know how i could solve me problem using $_SESSION but i was wondering if there is an easier way is there anyways to pull from two tables at the same time so if i have table a and table b and they have the exact some column names i was thinking something like $q="SELECT id,type,c1,c2 FROM tablea,tableb WHERE type='something'" then use a while statement to output everything Link to comment https://forums.phpfreaks.com/topic/126705-pull-from-two-tables/ Share on other sites More sharing options...
trq Posted October 2, 2008 Share Posted October 2, 2008 See this tutorial on the main site. Link to comment https://forums.phpfreaks.com/topic/126705-pull-from-two-tables/#findComment-655339 Share on other sites More sharing options...
iversonm Posted October 2, 2008 Author Share Posted October 2, 2008 i already kinda looked through it what i want to do is add the rows so you have row1 from this table and row 2 is from the second table and maybe row 3 and 4 is from the first table so it combines the rows and then organizes them by a column a specify Link to comment https://forums.phpfreaks.com/topic/126705-pull-from-two-tables/#findComment-655348 Share on other sites More sharing options...
trq Posted October 2, 2008 Share Posted October 2, 2008 Exactly what the tutorial describes. Do we need to write it again? Link to comment https://forums.phpfreaks.com/topic/126705-pull-from-two-tables/#findComment-655354 Share on other sites More sharing options...
ballhogjoni Posted October 2, 2008 Share Posted October 2, 2008 You need to learn about table joins. Link to comment https://forums.phpfreaks.com/topic/126705-pull-from-two-tables/#findComment-655358 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.