@@ 247-253 (lines=7) @@ | ||
244 | } |
|
245 | $set = implode(',', $set); |
|
246 | $sql = "UPDATE $tablename SET $set WHERE $where"; |
|
247 | if($this->pdo->exec($sql) === false) |
|
248 | { |
|
249 | if (php_sapi_name() !== "cli") { |
|
250 | error_log('DB query failed. '.print_r($this->pdo->errorInfo(), true)); |
|
251 | } |
|
252 | return false; |
|
253 | } |
|
254 | return true; |
|
255 | } |
|
256 | ||
@@ 288-294 (lines=7) @@ | ||
285 | $cols = implode(',', $cols); |
|
286 | $set = implode(',', $set); |
|
287 | $sql = "INSERT INTO $tablename ($cols) VALUES ($set);"; |
|
288 | if($this->pdo->exec($sql) === false) |
|
289 | { |
|
290 | if (php_sapi_name() !== "cli") { |
|
291 | error_log('DB query failed. '.print_r($this->pdo->errorInfo(), true)); |
|
292 | } |
|
293 | return false; |
|
294 | } |
|
295 | return true; |
|
296 | } |
|
297 |