How to Insert Data Into a MySQL Table
How to use an INSERT query to add data to a MySQL table, including the optional column list.
How to use an INSERT query to add data to a MySQL table, including the optional column list.
How to select a MySQL database so your queries know which one to run against.
Two ways to create a MySQL database: with phpMyAdmin or by running a CREATE DATABASE query yourself.
Use PHP’s strtoupper, strtolower, ucfirst and ucwords functions to tidy up the case of your text.
A quick .htaccess trick to restrict a website to your own IP address while you build the front end.
A PHP workaround for running subqueries on MySQL 4, which lacks subquery support: fetch IDs into an array and implode them into an IN clause.
How to use the PHP explode() and implode() functions to convert between strings and arrays, with examples and a tip for remembering each one.
How to use the PHP var_dump() function to inspect a variable’s type, value and structure recursively while debugging your code.
How to select a random row from a MySQL table using ORDER BY RAND() LIMIT 1, a more efficient approach than fetching all rows in your code.
How to enable all PHP error reporting with error_reporting and display_errors so you can see every error while debugging your code.
How to reseed a MySQL primary key with ALTER TABLE AUTO_INCREMENT so new user IDs and order numbers do not reveal that your site just launched.
How the PHP heredoc syntax lets you assign long strings of text without escaping quotes, while still parsing variables inside the block.