mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
Db: and once again
This commit is contained in:
parent
289939a1bb
commit
6243fa33ff
@ -312,8 +312,8 @@ class Db extends DbConnection
|
|||||||
{
|
{
|
||||||
$db = $this->db();
|
$db = $this->db();
|
||||||
$query = $db->select()
|
$query = $db->select()
|
||||||
->from('import_run', $this->dbHexFunc('rowset_checksum'))
|
->from(array('r' => 'import_run'), $this->dbHexFunc('r.rowset_checksum'))
|
||||||
->where('id = ?', $id);
|
->where('r.id = ?', $id);
|
||||||
|
|
||||||
return $db->fetchOne($query);
|
return $db->fetchOne($query);
|
||||||
}
|
}
|
||||||
@ -388,17 +388,17 @@ class Db extends DbConnection
|
|||||||
}
|
}
|
||||||
|
|
||||||
$lastRun = $db->select()->from(
|
$lastRun = $db->select()->from(
|
||||||
'import_run',
|
array('r' => 'import_run'),
|
||||||
array('checksum' => $this->dbHexFunc('rowset_checksum'))
|
array('checksum' => $this->dbHexFunc('r.rowset_checksum'))
|
||||||
);
|
);
|
||||||
|
|
||||||
if (is_int($source) || ctype_digit($source)) {
|
if (is_int($source) || ctype_digit($source)) {
|
||||||
$lastRun->where('source_id = ?', $source);
|
$lastRun->where('r.source_id = ?', $source);
|
||||||
} else {
|
} else {
|
||||||
$lastRun->where('source_name = ?', $source);
|
$lastRun->where('r.source_name = ?', $source);
|
||||||
}
|
}
|
||||||
|
|
||||||
$lastRun->order('start_time DESC')->limit(1);
|
$lastRun->order('r.start_time DESC')->limit(1);
|
||||||
$checksum = $db->fetchOne($lastRun);
|
$checksum = $db->fetchOne($lastRun);
|
||||||
|
|
||||||
return $this->fetchImportedRowsetRows($checksum, $columns);
|
return $this->fetchImportedRowsetRows($checksum, $columns);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user