Wade wrote:
> 04132005 1355 GMT-6
> 
> I should know this but I find I do not.
> 
> I want to get the total number of records in a certain table.
> 
> Would I do something like
>   select * from x
>     $result = mysql_num_rows();



total number of ROWS, yes.  but you may run into some other issues where 
you need a total and a field...

$sql = "select count(*) as 'total', fruit from TABLE group by fruit";
$result = mysql_fetch_array($sql);

would produce:

oranges 20
apples  10











Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

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

<*> 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