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

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -