Jump to content

Archive:PHP and MySQL Programming/Common Functions and Operators: Difference between revisions

From IdeaWazaWiki
wikademia>The Kid
No edit summary
wikademia>Wikademia
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{delete|see: Talk:Programming:PHP and MySQL}}
[[Programming:PHP and MySQL|TOC]]
== COUNT ==
== COUNT ==


Line 11: Line 7:
  mysql> SELECT SUM(`field_name`) FROM `table_name`;
  mysql> SELECT SUM(`field_name`) FROM `table_name`;


[[Category:PHP]]
[[../Basic Queries/|Previous: Basic Queries]] | [[../|TOC]] | [[../XML and PHP/|Next: XML and PHP]]
[[Category:MySQL]]
 
[[Category:PHP and MySQL Programming|{{SUBPAGENAME}}]]

Latest revision as of 07:37, 12 June 2009

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]]