Databases with PDO

MySQL taught the SQL; this section is the PHP side of it. PDO (PHP Data Objects, since PHP 5.1) opens the connection, sends statements, passes values in safely and turns rows into arrays or objects, with one API for MySQL 524 , PostgreSQL 1,289 , SQLite 4,756 and the other drivers. Every example runs on PHP 8.5 against the shop database of MySQL, logged in as shop_app, the least-privilege account of Subsection 3.16.9.

Subsections