Most of what a PHP page does to a value (rounding a price, trimming a name, grouping orders by month) can happen in the query instead, before the rows cross the network. The examples use SELECT to show each result, but every expression works equally in WHERE, ORDER BY, GROUP BY, UPDATE and generated columns (Generated Columns). All output comes from MySQL 9.7.2 524 against the shop database. Several functions from older tutorials are gone, and each removal is named where it matters.
MENU
Functions and Operators
Built-In Functions and Operators