mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 16:54:06 +02:00
Db: fetchActivityLogIdByChecksum - one more helper
This commit is contained in:
parent
402d2a7f53
commit
2e7342b879
@ -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') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user