Archive for the ‘CakePHP’ Category
From time to time when querying the database, you have to break the mold. CakePHP gives many options when it comes to complex conditions, but sometimes you need to push the boundaries. Recently I needed to return a subquery as a field name. It wasn’t a high demand query, so I wasn’t too concerned with [...]
Install PHP Pear Spreadsheet in Ubuntu and Mint
22 Feb
Posted by: trent in: CakePHP, Linux, PHP, Programming
If you’ve ever had to work with spreadsheets on a linux system, you may have stumbled across the PEAR Excel Spreadsheet Writer. Its a quite useful too, but installing it on your system may be a little misleading. Here’s the quick rundown: # install php-pear sudo apt-get install php-pear # install PEAR OLE sudo pear [...]
The web is a global resource for anything, anywhere, any timezone. But often times we are careless in consideration for people in other areas of the world. The different timezones offset people’s schedules from one area to the next. When handling user profiles (or anything for that matter) where date and time is involved we [...]
Not sure if cake has a prettier, more efficient way of grabbing components inside of Shells and Tasks with cakephp’s cli, but here is a way which worked for me. Inside your Task (or Shell) just use the following in a similar manner for your component: class FooTask extends Shell { App::import(‘Component’, ‘Bar’); $this->Bar =& [...]

