Tiffany B. Brown

A web log about web development and internet culture with frequent detours into other stuff.

Posts in: MySQL / Databases

Review: Learning PHP Data Objects by Dennis Popel
Packt Publishing graciously provided me with a copy of this book to review. PHP supports more than a dozen database setups, including the SQLite library bundled with PHP 5. That’s a lot of databases, and each one has its own connection syntax and server-specific functions. So what happens when you want to be able to [...] [23 Oct 2007]
Solution for “Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’” error when using PDO
If you’re trying to get up-and-running with PDO, you may experience a “Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’” error when trying to connect to your database, even if your php.ini and my.cnf files contain a different default socket path for MySQL. It’s counterintuitive to a degree, but it’s actually expected behavior. The good [...] [22 Oct 2007]
OurIndustryIsBroken.com: Tracking site users and traffic with PHP, MySQL and ActionScript
You may remember that FletcherMartin launched OurIndustryIsBroken.com back in April. After receiving some feedback about the site, we tweaked it to enhance the user experience and allow us to track how visitors use the site. We’re using Google Analytics for high-level analysis such as referrals and search engine traffic. But we wanted to do more robust [...] [23 Jul 2007]
Two Mysqli problems and their easy fixes
Having problems with Mysqli? Try doing these (which may or may not help you). If you’re on a shared host, you may have to talk to your hosting provider, or you may want to get a web host that offers VPS or dedicated server hosting. Set zend.ze1_compatibility_mode = Off. You’ll need access to your php.ini file [...] [11 Aug 2006]
Link dump: August 8, 2006
Yahoo! Python Developer Center Yahoo adds snakes on an API (Via Jeremy Zawodny, and as you can see, I jacked his post title.) MySQL Connection Management in PHP - How (Not) To Do Things How to best use MySQL connections when developing with PHP. (Hint, only make the connection when necessary.) This post covers ‘lazy loading’ and content [...] [8 Aug 2006]
Question re: MySQL and PRIMARY versus UNIQUE indexes
Any MySQL gurus in the house? I need your help. I’ve got a question: If I have an auto_incrementing id field that is a primary key, and I plan to use that key in a related table, is the primary key enough, should I make it a primary key and a unique key (thereby creating [...] [20 Jul 2006]
NYPHP Con: “Introduction to PDO”
PDO ships with PHP 5.1. You do not need to install via PECL These are my notes from a presentation by Ilia Alshanetsky. This post may contain inaccuracies, typos, boo-boos, etc. PDO stands for “PHP Data Objects Layer”: A data-access abstraction layer. Common interface for any number of database systems PHP extension Designed to simplify features. Only available to PHP [...] [16 Jun 2006]
NYPHP Con: “Maximum Velocity MySQL” - Benchmarking and Profiling
Jay Pipes is the Community Relations Manager, North America for MySQL, Inc. This was a three-hour tutorial about ways to fine-tune your MySQL queries. This is part three of my notes. This post may contain inaccuracies, typos, boo-boos, etc. Jay says his slides will be available on his web site, so be sure to check [...] [14 Jun 2006]