[]RSS

About Archives Artwork Comic Contact Philosophy Projects Tags

Top for MySQL

[Comment]

December 28th, 2007 in Links

MyTop is a top tool for MySQL. It’s a text application for Linux systems that shows you what’s happening on your DB server.

New features in Php 5.3

[Comment]

November 20th, 2007 in Links

Here’s a great set of articles showing off the new features in Php 5.3: Part 1, 2, 3, 4. It’s fun to watch languages evolve.

InstantRails = Rails + MySQL + Apache

[Comment]

April 14th, 2007 in Links

InstantRails is an all-in-one distribution of Rails, Apache, and Mysql for Windows users. It comes with a funky little console, and some demo rails applications to play with. A very quick way to hack at Rails bits when in Windows land.

Flickr architecture slides

[Comment]

March 28th, 2007 in Links

Some slides on Flickr’s architecture. It’s all sensible stuff, with very little magic: Php4, Mysql (innodb), ImageMagick, Perl, Java (for nodes), RHEL, and so on.

Tips on big data in MySQL

[Comment]

November 26th, 2006 in Links

Some tips on MySQL settings for largeness, avoid pain and suffering by understanding how it works.

MySQLi newsgroup

[Comment]

October 29th, 2006 in Links

Google groups has a MySQLi group.

Php database interfaces

[Comment]

October 29th, 2006 in Php. Weblog

bambooLet’s face it, the default Php MySQL interfaces are pretty weak. A few of the shortcomings:

  • No prepared statements
  • In lacking prepared statements, requires the use of escaping functions for any SQL containing POST/GET variables
  • Read functions overwrite duplicate column names in returned data when reading rows from joined tables
  • Has a very verbose API, with many long parameter lists
  • Is not class based, so everyone bakes their own abstraction

Compared to the Perl DBI, for example, Php’s mysql_ functions are absolutely horrid. Luckily there are many great alternatives, as I discovered this weekend with a bit of research.

The PDO

Php’s PDO functions are similar to Perl’s DBI, sporting a reasonable API and supporting a number of databases.

Php’s improved MySQL functions

Php has an improved set of MySQL functions (the mysqli_ functions) that add both a simple class wrapper and a parallel, improved API. The new API supports prepared statements, and has a cleaner interface layout. The new APIs still munge the fetch_assoc functions (they still overwrite), but are otherwise a great improvement.

The improved MySQL functions are only available in Php 5, and I’ve read warnings that it’s a pain to run both the msql_ and mysqli_ functions from one Php installation.

Pear’s MDB2

The MDB2 package from the Pear repository replaces their previous DB package, and provides a similar interface to Perl’s DBI. I find the interface a bit bigger than my needs present, but it is a very complete and mature abstraction.

In the real world

All of these libraries are available on most platforms and from most reasonable webhosts (like Dreamhost).

My first choice so far is the improved mysqli_ class/functions, then the built-in PDO library. I’ll spend a few weeks with them and then post a follow-up.

Real databases

[Comment]

October 27th, 2006 in Links

Let’s get a real database, a story about Google choosing a ‘real’ database over MySql (for Adwords) and then the developers regretting it.

Building a Weblog with PHP and MySQL

[Comment]

November 19th, 2005 in Links

Building a Weblog with PHP and MySQL. DIY weblogging, a good, motivated project if you need a reason to learn Php+MySQL.

PHP Login System with Admin Features

[Comment]

September 2nd, 2005 in Links

PHP Login System with Admin Features, a reasonable sample Php/Mysql login class (including source). A good starting point for newish Php developers.

Next page [>>]