@@ 373-382 (lines=10) @@ | ||
370 | } |
|
371 | ||
372 | // Check for failures |
|
373 | if (!$this->conn->Execute($sql)) { |
|
374 | // Check for unique constraint failure |
|
375 | if (stristr($this->conn->ErrorMsg(), 'unique')) { |
|
376 | return -1; |
|
377 | } |
|
378 | ||
379 | if (stristr($this->conn->ErrorMsg(), 'referential')) { |
|
380 | return -2; |
|
381 | } // Check for referential integrity failure |
|
382 | } |
|
383 | ||
384 | return $this->conn->ErrorNo(); |
|
385 | } |
|
@@ 441-450 (lines=10) @@ | ||
438 | } |
|
439 | ||
440 | // Check for failures |
|
441 | if (!$this->conn->Execute($setClause.$whereClause)) { |
|
442 | // Check for unique constraint failure |
|
443 | if (stristr($this->conn->ErrorMsg(), 'unique')) { |
|
444 | return -1; |
|
445 | } |
|
446 | ||
447 | if (stristr($this->conn->ErrorMsg(), 'referential')) { |
|
448 | return -2; |
|
449 | } // Check for referential integrity failure |
|
450 | } |
|
451 | ||
452 | // Check for no rows modified |
|
453 | if ($this->conn->Affected_Rows() == 0) { |