Quick Search:
 
 mySQL: Counting rows Jump to:  
Category: >> mySQL >> Counting rows  

<< lastnext >>

Snippet Name: Counting rows

Description: A very fast way to get the number of rows in a table is doing this.

Comment: (none)

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

$total = mysql_result(mysql_query("SELECT COUNT(id) FROM yourtable"),0);


 
   Home |    Search |    Code Library |    Sponsors |    Privacy |    Terms of Use |    Contact Us © 2003 - 2024 psoug.org