This is a follow-up to my previous article on installing a LAMP Stack on Snow Leopard and explains the steps that you need to get Lion up and running for LAMP development. (Linux, Apache, MySQL and PHP in case you don’t already know). Lion comes pre-installed with Apache and PHP 5.3.6 so you only need [...]
MySQL can’t specify target table for update in FROM clause
If you’re at this page you probably have encountered an error similar to “Error Code: 1093 You can’t specify target table ‘my_table’ for update in FROM clause” The reason for this error is that MySQL doesn’t allow updates to a table when you are also using that same table in an inner select as your [...]
Installing LAMP stack on OSX 10.6 Snow Leopard
Updated instructions are available for installing LAMP on OSX 10.7 Lion. I’m setting up a new machine and found a great tutorial written by Josh Lockhart on getting a PHP web development environment up and running on Snow Leopard. This goes through almost everything to be up and running for a typical LAMP stack with [...]
PHP on OSX: Can't connect to local MySQL server through socket '/var/mysql/mysql.sock'
When installing PHP and MySQL on OSX you may get the error Can’t connect to local MySQL server through socket ‘/var/mysql/mysql.sock’. Or you may also get “No such file or directory” when calling mysql_connect from a PHP page. This occurs because PHP is looking for the file mysql.sock in it’s typical installation location of /var/mysql/mysql.sock. [...]
Subtracting unsigned integers with MySQL
Unsigned integer values are used in a database when you only expect to contain positive values and no negative values (less than zero). If you know a certain field will never legitimately contain negative values, then this is actually the most efficient field type to select. There is a catch with unsigned ints however that [...]