Diana,

This is how I typically do this with mysql_num_rows:

$sql = "SELECT * FROM sometable
        WHERE field LIKE '%$field%' LIMIT 0, 30 ";

$result = mysql_query($sql)
        or die ("Error In Query:".mysql_error());

$num_results = mysql_num_rows($result);

HTH!

Cory

On Tue, 2002-12-10 at 09:54, Diana Castillo wrote:
> After I run a query lik this,
> $db->query($sql);
> 
> what is the quickest way to find out how many records result? Without having
> to loop through them all?
> 
> Thank you ,
> Diana
> 
-- 
Cory Hicks <[EMAIL PROTECTED]>
TRI-International


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to