Jump to content

PHP and MySQL Programming/Common Functions and Operators

From Wikibooks, open books for an open world

COUNT

[edit | edit source]
mysql_query(" SELECT COUNT(*|`field_name`) FROM `table_name` ");
mysql> SELECT SUM(`field_name`) FROM `table_name`;