Understanding the MySQL Foreign key
A MySQL Foreign key is a field or multiple fields in a table that identify to other another table uniquely to enforce data integrity. This relationship can also be seen…
A MySQL Foreign key is a field or multiple fields in a table that identify to other another table uniquely to enforce data integrity. This relationship can also be seen…
How to get information in JSON format about a MySQL table. INFORMATION_SCHEMA has information about the metadata of the database structure such as column types, defaults, lenghts and keys. To…
How to fix MySQL server not starting in the XAMPP control panel. The logs will most likely say unexpected shutdown or “Index for table ‘.\mysql\user’ is corrupt; try to repair…
The Relational database model or schema is one that uses many tables that are all related to each other, hence the relational name tag. With the data all being related…
How to load a SQL query from a file instead of having an inline query. This is done to help with formatting and easier understanding of the code. All that…
Effectively manage PHP MySQL inserts from a large loop using the PDO connection. The key is to avoid committing data on each loop, this is done using a transaction. Use…
Modern PHP PDO MySQL database backup script which includes a gzip compression option. Modified from this Stack Overflow post, the script is easy to use with configurable options for the…
A shortcut method to quickly creating dynamic Chart.js bar charts using PHP and data from a MySQL database. This blog post is for a single Y-axis bar chart. Gist link….
How to handle PHP PDO exceptions with the try and catch method to control the flow of any potential errors with PDO connections and queries. The try and catch exceptions…
PDO is a PHP extension for accessing and interacting with databases using object-orientation. As PDO is targetted for executing queries with prepared statements it is (with correct usage) safer than…