The basic methods and properties of the wpdb class is already well explained on the WordPress Codex page so there’s no point to reiterate them here. Instead, we’re going to go through a few common mistakes that WordPress developers can make, how to rectify them, as well as best practices that can be applied when using the wpdb class.

I’ve been working with the WordPress wpdb class a fair amount. To be honest, it’s not anywhere near as nice to work with as Laravel’s Eloquent ORM, or even CodeIgniter’s Query Builder, but it is functional. Anyhow, this is a good guide for people who might be unfamiliar with it.