Jump to content

adding 2 querys


runnerjp

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.