updating logs
This commit is contained in:
@@ -104,7 +104,7 @@ $filter_query = "&loglevel=$loglevel&logtext=$logtext&machine_id=$machine_id&tim
|
||||
$offset = ($current_page - 1) * $page_size;
|
||||
|
||||
// Get total number of log entries based on filters
|
||||
$sql = "SELECT count(*) AS log_count FROM machines,log WHERE machine_location LIKE ? AND loglevel LIKE ? AND logtext LIKE ? AND machine_id LIKE ? AND time LIKE ?";
|
||||
$sql = "SELECT count(log.id) AS log_count FROM machines,log WHERE machine_name=machine_id AND machine_location LIKE ? AND loglevel LIKE ? AND logtext LIKE ? AND machine_id LIKE ? AND time LIKE ?";
|
||||
$stmt = $conn->prepare($sql);
|
||||
$loglevel = "%" . $loglevel . "%";
|
||||
$logtext = "%" . $logtext . "%";
|
||||
|
||||
@@ -100,7 +100,7 @@ $filter_query = "&hash=$hash&path=$path&machine_id=$machine_id&action=$action&ma
|
||||
if ($conn->connect_error) {
|
||||
die("Connection failed: " . $conn->connect_error);
|
||||
}
|
||||
$sql = "SELECT count(*) AS log_count FROM machines,vir_notify WHERE machine_location LIKE ? AND path LIKE ? AND hash LIKE ? AND machine_id LIKE ? AND action LIKE ?";
|
||||
$sql = "SELECT count(vir_notify.id) AS log_count FROM machines,vir_notify WHERE machine_name=machine_id AND machine_location LIKE ? AND path LIKE ? AND hash LIKE ? AND machine_id LIKE ? AND action LIKE ?";
|
||||
$stmt = $conn->prepare($sql);
|
||||
$path = "%" . $path . "%";
|
||||
$hash = "%" . $hash . "%";
|
||||
|
||||
Reference in New Issue
Block a user