Specifying a db function in an insert statement in Zend -
i have this:
$data = array('username' => 'john', 'password' => 'john123'); $table = new zend_db_table('users'); $table->insert($data);
but want include hashing function password, sql this:
insert `users` (`username`, `password`) values ('john', password('john123'));
how can that, elegantly?
$data = array('username' => 'john', 'password' => new zend_db_expr('sha1(john123)');
Comments
Post a Comment