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