CoderZone.org

Category: >> mySQL >> Counting rows Bookmark and Share

<< lastnext >>

Snippet Name: Counting rows

Description: A reasonably fast way to get the number of rows in a table.

Also see:
» Simple directory viewer / browser
» Recursive Directory Browser
» Make alternating color table rows ...
» Highlight table rows on rollover
» Converting Rows to Columns
» Dynamically Add/Remove rows in HTM...
» UPDATE: Update multiple rows
» Count rows in all tables
» List tables with more than 'X' rows
» Easy page browser
» Hierarchical categories browser
» Recursive Directory Browser
» Browser sniffer / detector
» Grouping rows by frequency
» Detect Mobile/WAP browser
» Find All Duplicate Rows

Comment: (none)

Author: CoderZone
Language: MYSQL
Highlight Mode: MYSQL
Last Modified: February 28th, 2009

$total = mysql_result(mysql_query("SELECT COUNT(id) FROM yourtable"),0);
 
There haven't been any comments added for this snippet yet. You may add one if you like.  Add a comment 
© coderzone.org | users online: 7