A web developer's blog. PHP, MySQL, CakePHP, Zend Framework, Wordpress, Code Igniter, Django, Python, CSS, Javascript, jQuery, Knockout.js, and other web development topics.

Monthly Archives: April 2008

Serialize + base64_encode an array for a URL

This is an alternative for passing a bunch of variables in the URL. The variables might be used for pagination scripts (limits, etc.), sorting results and others. Generally, I would do something like this for sorting results: http://localhost/reports?sort=username&sort_type=ASC That will … Continue reading

Posted in General | Tagged , , , | 2 Comments

WordPress Update

I got tired of the old theme. Updated the site into something more interesting. I also removed the ads I decided to upgrade to the lastest WordPress too. Upgrading WP is such a pain in the ass I lost all … Continue reading

Posted in General | 1 Comment

Firefox and Yahoo Mail Crashes

I don’t know if it is just me but do Firefox and Yahoo Mail have compatibility issues? Almost every time I close a Yahoomail tab or window (while logged in), Firefox crashes! I am on a Mac and running FF2. … Continue reading

Posted in General | Tagged , | 3 Comments

Zend_Db Changing Fetch Mode

I love this, since I do not have to type [' and '] at the end of each field. Typing -> is easier! $db = Zend_Registry::get(’db’); $db->setFetchMode(Zend_Db::FETCH_OBJ); $result = $db->fetchAll("SELECT * FROM user_roles"); foreach($result AS $row) { echo $row->fieldA; //instead … Continue reading

Posted in General | Tagged , | Leave a comment

Reading and Writing Excel Spreadsheet Using PHP

I have blogged about Microsoft Excel and PHP within the past few months. So a post from Zend Devzone caught my attention. It is about reading and writing into Excel using PHP. You can add a spreadsheet, do calculations and … Continue reading

Posted in General | Tagged , | Leave a comment

Zend Framework: View File downloaded as Excel File

This is basically a back-up post from my previous posts regarding exporting of data from a database to an excel file. Since Excel is able to read HTML tables, we can directly export a “view” file into an excel file … Continue reading

Posted in General | Tagged , | 6 Comments