PDO

Killing MySQL Queries that exceed a timeout using PDO and PHP

Here is an easy way to kill queries using PDO connection method with MySQL. Note that you can NOT kill queries using a "prepared" string. It must be done using "query".

The first step is to grab the PROCESSLIST.

PDO Connection Basics and Examples using PHP

Here are some PDO connection method basics with examples.

You will often commonly see the connection method being referred to as $dbh and $sth. These simply stand for "database handler" and "statement handler".

Connecting to MySQL with PDO Object

Update MySQL PDO Function

Below is a PDO update function that I wrote to save me time from
constantly constructing the PDO update query whenever I need it. Now I
simply pass my values and fields to the function and all is taken care
of.

Insert to MySQL PDO Function

Below is a PDO insert function that I wrote to save me time from
constantly constructing the insert query whenever I need it. Now I
simply pass my values and fields to the function and all is taken care
of.

Connect to MySQL database using PDO

Below is how to set up a PDO connection to a MySQL database.

Subscribe to RSS - PDO