Chapter 12 – Database Access
- php_fetch.php – Reading from table using mysqli_fetch_assoc
- php_fetch1.php – Reading from table with HTML formatting
- php_updates.php – Updating data
- php_pdo_objects_basic_01.php – Simple SQL Fetch and PDO
- php_pdo_objects_basic_02.php – SQL Fetch using bindValue and named placeholders
- php_pdo_objects_basic_03.php – SQL Fetch using bindParam and named placeholders
- php_pdo_objects_basic_04.php – Example of SQL insert with PDO
- php_pdo_objects_basic_05.php – SQL Insert with try / catch and PDO
- php_pdo_objects_basic_06.php – Example of SQL Fetch try / catch and PDO
- php_pdo_objects_basic_07.php – SQL fetch and PDO reading into a $table array
- php_pdo_objects_basic_08.php – SQL fetch using named values
This code sample is from a chapter in the book PHP-Tutorials:Programming with MySQL and PHP.
You can read more about the book by going here: