@@ 250-252 (lines=3) @@ | ||
247 | $stmt = $this->pdo->query($sql); |
|
248 | if($stmt === false) |
|
249 | { |
|
250 | if (php_sapi_name() !== "cli") { |
|
251 | error_log('DB query failed. '.print_r($this->pdo->errorInfo(), true)); |
|
252 | } |
|
253 | return false; |
|
254 | } |
|
255 | else if($stmt->rowCount() === 0) |
|
@@ 299-301 (lines=3) @@ | ||
296 | $sql = "INSERT INTO $tablename ($cols) VALUES ($set);"; |
|
297 | if($this->pdo->exec($sql) === false) |
|
298 | { |
|
299 | if (php_sapi_name() !== "cli") { |
|
300 | error_log('DB query failed. '.print_r($this->pdo->errorInfo(), true)); |
|
301 | } |
|
302 | return false; |
|
303 | } |
|
304 | return true; |