Archive for the 'Database' Category

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 […]

It's no secret, I'm a fan of the Zend Framework, which I've been using since version 0.15. A lot of components have been added since then, and many of the initial components have been refactored and enhanced, and have matured. And that includes the Zend_Db_Select component, which has been evolving quite nicely, and even Zend_Db_Table_Abstract […]

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 […]