PHP and MySQL Programming/Common Functions and Operators
Appearance
COUNT
[edit | edit source]mysql_query(" SELECT COUNT(*|`field_name`) FROM `table_name` ");
SUM
[edit | edit source]mysql> SELECT SUM(`field_name`) FROM `table_name`;
mysql_query(" SELECT COUNT(*|`field_name`) FROM `table_name` ");
mysql> SELECT SUM(`field_name`) FROM `table_name`;
Basic Queries | PHP and MySQL Programming Common Functions and Operators |
XML and PHP |