Archive:PHP and MySQL Programming/Common Functions and Operators: Difference between revisions
Appearance
wikademia>Darklama m Programming:PHP and MySQL:Common Functions and Operators moved to Programming:PHP and MySQL/Common Functions and Operators: fixing copy+paste move |
wikademia>Darklama m restore current version |
||
| Line 1: | Line 1: | ||
== COUNT == | == COUNT == | ||
| Line 10: | Line 6: | ||
mysql> SELECT SUM(`field_name`) FROM `table_name`; | mysql> SELECT SUM(`field_name`) FROM `table_name`; | ||
[[../Basic Queries/|Previous: Basic Queries]] | [[../|TOC]] | [[../XML and PHP/|Next: XML and PHP]] | |||
[[Category:PHP]] | [[Category:PHP]] | ||
[[Category:MySQL]] | [[Category:MySQL]] | ||
Revision as of 13:09, 2 April 2007
COUNT
mysql> SELECT COUNT(*|`field_name`) FROM `table_name`;
SUM
mysql> SELECT SUM(`field_name`) FROM `table_name`;
[[../Basic Queries/|Previous: Basic Queries]] | [[../|TOC]] | [[../XML and PHP/|Next: XML and PHP]]