Speaking at Nomad PHP (EU)

Speaking
This post is over 4 years old and is probably out of date.

Hot on the heels of my ZendCon EU Keynote announcement yesterday, I wanted to invite everybody to sign up for Nomad PHP EU. Nomad PHP is an online PHP User Group for people who don’t have a local user group, or who just want to see more quality talks!

For those of you in Europe, or who want to watch the talks during work hours with your team, there is now Nomad EU. Nomad PHP EU meetings take place at 20:00 CET, which is 2pm EST, or 11am PST.

I will be presenting Introduction to Databases on November 14th.

This talk will cover the basics necessary to help you decide what data to store, where, and how.

We will cover PDO — PHP’s Data Object extension, which allows you to talk to a variety of databases, including MySQL.

You will learn how to CRUD — Create, Retrieve, Update and Delete data, database schema, and when to use indexes.

Additionally, we will look at other data storage systems such as memcache, and nosql databases.

I originally gave this talk at Lonestar PHP 2013 back in June and it was my favorite talk I have given to date — if you are new to databases, want to learn JOINs and Foreign Keys, or just want to brush up on your fundamental MySQL skills, this talk will have something for you!

Debugging PDO Prepared Statements

Standard
This post is over 8 years old and is probably out of date.

Something that has always bugged me about using prepared statements, is that you can really only get the query sent to the database by catching it in the logs.

Today, a friend asking me if it was possible to get a prepared statement back from PDO with the values placeholders replaced, finally caught me in a moment where I could do something about it.

I wrote a thin PDO wrapper class that will [imperfectly, I’m sure] return the completed query.

It supports bound parameters, values and the array key->value methods of passing in values to prepared queries. You can see the code and examples below:

This results in the following output:

Hopefully, this will help you get a somewhat better idea of what’s going on :)