Tag: Database
Dirty Rows and Audit Trails with Zend_Db_Table
There are various ways to update rows in a database table using the Zend_Db_Table components. You can use use Zend_Db_Table::update(), like so:
$table = My_Table();
$table->update(array('age' => 22), 'id = 1');
or retrieve the row, and update it:
$table = My_Table();
$row = $table->find(1)->current();
$row->age = 22;
$row->save();
The big difference between the two approaches is that by first retrieving the row, and […]
Posted: September 27th, 2008 under Database, Development, PHP, Zend Framework.
Tags: audit, columns, Database, db, framework, mysql, PHP, rows, tables, trail, zend
Comments: none
Indexes in PostgreSQL
One thing that most people don't have to worry about in MySQL is case-sensitivity. Unless you're trying to authenticate a user against a database password and don't use MD5 (like you should!), in which case the password is not case sensitive by default.
In PostgreSQL everything is case sensitive. That means that if you have a […]
Posted: November 2nd, 2005 under Database.
Tags: Database, index, postgresql, sql
Comments: none
Modified DBDesigner
Earlier today I modified DBDesigner to, above all, not delete columns automatically after renaming the destination column in a relationship. It also displays "AI" for auto_increment columns, so I don't have to guess anymore whether I forgot to check that AI column without opening up the edit box for every single table, as there are […]
Posted: July 22nd, 2004 under Software & Tools.
Tags: Database, mysql
Comments: none