Archive for the ‘MySQL’ Category

MySQL Command Line Tips

Posted by michael on May 13th, 2009 under MySQL
Tags:  •  1 Comment

Working with MySQL’s command line shell is sometimes an exercise in patience. Here are some tips to make your life easier:
Display results vertically to avoid line-wrapping
If you do a select * from a table with a lot of columns, you will often end up with the results being wrapped across your terminal, making them just [...]

Both sides of a quick and simple web service

Posted by michael on April 3rd, 2007 under Code, MySQL
 •  2 Comments

To clarify the article title, when I say web service, I mean a piece of software that will receive and send out data via the HTTP protocol. Furthermore, this data is usually transmitted in XML format. I will also call this XML RPC occasionally, but there is also a specification called XML-RPC so things can [...]

Executing shell commands

Posted by michael on March 6th, 2007 under MySQL
 •  No Comments

Just a quick post - if you’re using PHP’s shell_exec to execute shell commands, take note of the following:
Permissions
If you’re reading or writing files, ensure that your working directory has the correct permissions for the www/apache user to access what it needs. On some systems, PHP will run as the nobody user, so adjust accordingly.
Pipes
Using [...]

Sorting arrays by an arbitary key value in PHP

Posted by michael on February 27th, 2007 under Code, MySQL
 •  1 Comment

I often (a couple times a month) have to sort an array of arrays by some arbitrary value located in the internal array. For example, I might want to sort the following structure by name.
Array[0] {
Array[0] {
id [...]

Useful things to know in CakePHP

Posted by michael on February 14th, 2007 under MySQL
 •  6 Comments

CakePHP is an awesome MVC (Model-View-Controller) framework for PHP 4 and 5 - it provides a great base to build your web application on, and can save you a huge amount of time if used correctly.
Unfortunately, the manual is sometimes lacking - whilst the information you need might be there, you probably will not be [...]