|
@@ 830-835 (lines=6) @@
|
| 827 |
|
$this->sql .= " " . implode(",", $fields); |
| 828 |
|
} |
| 829 |
|
|
| 830 |
|
if (! is_null($table_name) && is_string($table_name)) { |
| 831 |
|
$this->sql .= " FROM $table_name"; |
| 832 |
|
} else { |
| 833 |
|
throw (new Exception("Failed to create delete query, no table name", E_ERROR)); |
| 834 |
|
} |
| 835 |
|
|
| 836 |
|
if (! is_null($joins) && is_array($joins) && count($joins)) { |
| 837 |
|
$this->sql .= " " . implode(" ", $joins); |
| 838 |
|
} |
|
@@ 907-912 (lines=6) @@
|
| 904 |
|
$this->sql = null; |
| 905 |
|
$this->query_type = self::TRUNCATE; |
| 906 |
|
|
| 907 |
|
if (! is_null($table_name) && is_string($table_name)) { |
| 908 |
|
$this->sql = "TRUNCATE TABLE $table_name"; |
| 909 |
|
} else { |
| 910 |
|
throw new Exception("Table name is invalid", E_ERROR); |
| 911 |
|
} |
| 912 |
|
|
| 913 |
|
if (self::$autorun) { |
| 914 |
|
return $this->execute(MYSQLI_BOTH); |
| 915 |
|
} |