runnerjp Posted May 31, 2008 Share Posted May 31, 2008 hey guys can some 1 show me how to add to querys togther $getthreads="Select * from forumtutorial_posts where parentid='0' and forum = '$forum' ORDER BY important ASC, showtime desc $max" $getreplies="Select * from forumtutorial_posts where parentid='$id so i can then do this <?php echo $getthreads3[lastrepliedto]?><br> Last post by <b><? echo $getthreads3[lastposter]?> and get the last poster from both the thread starters and those that reply Link to comment https://forums.phpfreaks.com/topic/108152-adding-2-querys/ Share on other sites More sharing options...
paulman888888 Posted May 31, 2008 Share Posted May 31, 2008 yep. Thats the simplest way Link to comment https://forums.phpfreaks.com/topic/108152-adding-2-querys/#findComment-554421 Share on other sites More sharing options...
runnerjp Posted May 31, 2008 Author Share Posted May 31, 2008 ok sorry bit more comple then above lol here i go again ok so i have my query <?php $getthreads="Select * from forumtutorial_posts where parentid='0' and forum = '$forum' ORDER BY important ASC, showtime desc $max"; $getthreads2=mysql_query($getthreads) or die("Could not get threads"); while($getthreads3=mysql_fetch_array($getthreads2)) { ?> and i needs to add to it parentid='$getthreads3[postid]' thats more like it lol Link to comment https://forums.phpfreaks.com/topic/108152-adding-2-querys/#findComment-554426 Share on other sites More sharing options...
runnerjp Posted May 31, 2008 Author Share Posted May 31, 2008 ok didnt need was an error in my db! Link to comment https://forums.phpfreaks.com/topic/108152-adding-2-querys/#findComment-554448 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.