Aureole Posted October 9, 2007 Share Posted October 9, 2007 Here's a lovely problem for you while I go eat dinner. <?php $query ="SELECT * FROM replies INNER JOIN members ON members.mem_id=replies.reply_author_id WHERE reply_parent_id='{$t_id}' ORDER BY reply_id ASC"; $result = mysql_query($query) or die(mysql_error()); if(mysql_num_rows($result) == 0) { // CODE BLOCK 1 } else { // CODE BLOCK 2 } ?> There are no replies yet the above is executing CODE BLOCK 2 where it should be executing CODE BLOCK 1, you follow? Quote Link to comment https://forums.phpfreaks.com/topic/72484-using-mysql_num_rows-with-join-problem/ Share on other sites More sharing options...
pocobueno1388 Posted October 9, 2007 Share Posted October 9, 2007 have you tried putting that query in your phpmyadmin to see what it brings up? Quote Link to comment https://forums.phpfreaks.com/topic/72484-using-mysql_num_rows-with-join-problem/#findComment-365481 Share on other sites More sharing options...
Aureole Posted October 9, 2007 Author Share Posted October 9, 2007 Doesn't matter I realized what it was (I think) while eating Dinner, I'll test it out but I gotta go finish Dinner first. Quote Link to comment https://forums.phpfreaks.com/topic/72484-using-mysql_num_rows-with-join-problem/#findComment-365488 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.