Upload db.php
Browse files
db.php
CHANGED
@@ -484,7 +484,7 @@ class SQLite_DB {
|
|
484 |
}
|
485 |
|
486 |
$sql = "UPDATE `$table` SET " . implode(', ', $bits) . ' WHERE ' . implode(' AND ', $wheres);
|
487 |
-
return $this->query($this->prepare($sql, array_merge(array_values($data), array_values($where))));
|
488 |
}
|
489 |
|
490 |
public function delete($table, $where, $where_format = null) {
|
@@ -506,7 +506,7 @@ class SQLite_DB {
|
|
506 |
}
|
507 |
|
508 |
$sql = "DELETE FROM `$table` WHERE " . implode(' AND ', $wheres);
|
509 |
-
return $this->query($this->prepare($sql, array_values($where)));
|
510 |
}
|
511 |
|
512 |
private function _insert_replace_helper($table, $data, $format = null, $type = 'INSERT') {
|
@@ -534,7 +534,7 @@ class SQLite_DB {
|
|
534 |
}
|
535 |
|
536 |
$sql = "$type INTO `$table` (`" . implode('`,`', $fields) . '`) VALUES (' . implode(',', $formatted_fields) . ')';
|
537 |
-
return $this->query($this->prepare($sql, array_values($data)));
|
538 |
}
|
539 |
|
540 |
// Create WordPress tables in memory
|
|
|
484 |
}
|
485 |
|
486 |
$sql = "UPDATE `$table` SET " . implode(', ', $bits) . ' WHERE ' . implode(' AND ', $wheres);
|
487 |
+
return $this->query($this->prepare($sql, ...array_merge(array_values($data), array_values($where))));
|
488 |
}
|
489 |
|
490 |
public function delete($table, $where, $where_format = null) {
|
|
|
506 |
}
|
507 |
|
508 |
$sql = "DELETE FROM `$table` WHERE " . implode(' AND ', $wheres);
|
509 |
+
return $this->query($this->prepare($sql, ...array_values($where)));
|
510 |
}
|
511 |
|
512 |
private function _insert_replace_helper($table, $data, $format = null, $type = 'INSERT') {
|
|
|
534 |
}
|
535 |
|
536 |
$sql = "$type INTO `$table` (`" . implode('`,`', $fields) . '`) VALUES (' . implode(',', $formatted_fields) . ')';
|
537 |
+
return $this->query($this->prepare($sql, ...array_values($data)));
|
538 |
}
|
539 |
|
540 |
// Create WordPress tables in memory
|