Monthly Archives: September 2012

Add characters at the end of each line in Notepad ++

Description: Add a comma (,), period(.) or any other character at the end of each row in Notepad ++, from a column of elements. Solution: Addign a character in any position of a column in Notepad ++ is very easy. … Continue reading

Posted in Best practices, Tools | Tagged , , | Leave a comment

Find duplicate values in database table

Description: Detect fields that have duplicate values in a database table. Solution: For finding duplicate values, the COUNT condition can be used, specifying the column name that we require. Example: SELECT customer_idFROM customers_tableGROUP BY customer_idHAVING count( * ) > 1; Also … Continue reading

Posted in SQL | Tagged , | Leave a comment

Use adapter with Zend_Db

Description: Return a selection of database table fields using the Zend_Db adapter with Zend Framework Solution It’s easier to create an adapter of the database table class and use it in returning the desired values. This grants speed, clean code … Continue reading

Posted in Best practices, SQL, Zend Framework | Tagged , , | Leave a comment

Rewrite links with htaccess

Description: Rewrite or redirect links insite a web application. Solution: Redirection is simple using htaccess. Just create a file named .htaccess in the root of your web project and with some basic rules and regular expressions, all calls to your … Continue reading

Posted in System, Tools | Tagged , | 7 Comments

Get current and past month with Zend Date

Description: Return current and previous months in Zend Framework, considering passing into a new year as well. Solution: Zend Framework, through Zend_Date() offers a quick solution for this problem. With the get() function we can return any part of the current date, and with … Continue reading

Posted in PhP, Tools, Zend Framework | Tagged , | 1 Comment