Archive for February, 2008

How To Tar A Directory

Posted on February 23rd, 2008 in Everyday Tips, Sys Admin | No Comments »

I constantly forget how to tar a directory. I think the ln command and the tar command have their parameters in different orders and I can never seem to remember which parameter is the dir you are archiving and which one is the name for the archive. So here it is:

tar -czf archive.tgz dirName

How To Sort A Zend_Db_Table_Rowset

Posted on February 14th, 2008 in PHP, Web Development, Zend Framework | 3 Comments »

So you figured out how to define the relationships between your Zend_Db_Tables and you have issued a call to findDependentRowset(). You get your Rowset back but you need to sort the results by one of the columns in the dependent table. How do you do that?

The short answer is, you can’t! Unfortunately, this functionality won’t be available until the 1.5 release of the Zend Framework. But you can write your own utitlity function to sort your Rowset for you.

Read the rest of this entry »

How To Implement Partials In Zend Framework 1.0.3

Posted on February 11th, 2008 in PHP, Web Development, Zend Framework | No Comments »

The pre release of Zend Framework 1.5 has been out for a few days and includes an implementation for partials – among other things. But the GA release is still at least a few weeks off and I’ve got a project that needs to go live very soon. So, I’m using version 1.0.3 of the Zend Framework released on 11/30/2007, and I want to make use of partials in my project. The trick involves three steps.

  1. Create a View Helper
  2. Access your Zend_View object from the View Helper (or instantiate a new one)
  3. Render a view script from within the View Helper

Read the rest of this entry »

Get Adobe Flash playerPlugin by wpburn.com wordpress themes