Db: fetchActivityLogIdByChecksum - one more helper

This commit is contained in:
Thomas Gelf 2016-02-24 11:38:11 +01:00
parent 402d2a7f53
commit 2e7342b879
1 changed files with 10 additions and 0 deletions

View File

@ -194,6 +194,16 @@ class Db extends DbConnection
}
}
public function fetchActivityLogIdByChecksum($checksum)
{
if ($this->getDbType() === 'pgsql') {
$checksum = new Zend_Db_Expr("\\x" . bin2hex($checksum));
}
$sql = 'SELECT id FROM director_activity_log WHERE checksum = ?';
return $this->db()->fetchOne($sql, $checksum);
}
public function fetchActivityLogEntry($checksum)
{
if ($this->getDbType() === 'pgsql') {