query("SELECT * FROM $table ORDER BY `id` DESC LIMIT 1"); $row_data = mysqli_fetch_assoc($query_data); $camera_mode = $row_data['otomatis']; // monitor foto manual $query_foto = $conn->query("SELECT * FROM $table_foto ORDER BY `timestamp` DESC LIMIT 1"); $row_foto = mysqli_fetch_assoc($query_foto); // monitor foto auto $query_foto_auto = $conn->query("SELECT * FROM $table_foto_auto ORDER BY `timestamp` DESC LIMIT 1"); $row_foto_auto = mysqli_fetch_assoc($query_foto_auto); ?>