I used this code...but it only prints a 1:

$countquery = "SELECT COUNT(*)
                                        FROM mb_reply
                                        WHERE mb_parent = $threadid";
$countresult = mysql_query($countquery) or die(mysql_error());
$replies = mysql_num_rows($countresult);

print $replies;

What is wrong with this? Can anyone offer any suggestions?

Thanks for the help thus far.

Jer


--- In [email protected], Pete <[EMAIL PROTECTED]> wrote:
>
> In message <[EMAIL PROTECTED]>,
> kevin myers <[EMAIL PROTECTED]> writes
> >results = mysql_query(SELECT * FROM (reply table name) where MB_PARENT = 
> >"$mbid" 
> >)
> >$replies = mysql_num_rows($results)
> 
> It would be faster to SELECT COUNT(*)...
> 
> -- 
> Pete Clark
> 
> Sunny Andalucia
> http://www.hotcosta.com/comm_1.htm
>






The php_mysql group is dedicated to learn more about the PHP/MySQL web database 
possibilities through group learning.  
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php_mysql/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/php_mysql/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to