| @@ 234-243 (lines=10) @@ | ||
| 231 | } |
|
| 232 | ||
| 233 | // Check for failures |
|
| 234 | if (!$this->conn->Execute($sql)) { |
|
| 235 | // Check for unique constraint failure |
|
| 236 | if (stristr($this->conn->ErrorMsg(), 'unique')) { |
|
| 237 | return -1; |
|
| 238 | } |
|
| 239 | ||
| 240 | if (stristr($this->conn->ErrorMsg(), 'referential')) { |
|
| 241 | return -2; |
|
| 242 | } // Check for referential integrity failure |
|
| 243 | } |
|
| 244 | ||
| 245 | return $this->conn->ErrorNo(); |
|
| 246 | } |
|
| @@ 298-307 (lines=10) @@ | ||
| 295 | } |
|
| 296 | ||
| 297 | // Check for failures |
|
| 298 | if (!$this->conn->Execute($setClause . $whereClause)) { |
|
| 299 | // Check for unique constraint failure |
|
| 300 | if (stristr($this->conn->ErrorMsg(), 'unique')) { |
|
| 301 | return -1; |
|
| 302 | } |
|
| 303 | ||
| 304 | if (stristr($this->conn->ErrorMsg(), 'referential')) { |
|
| 305 | return -2; |
|
| 306 | } // Check for referential integrity failure |
|
| 307 | } |
|
| 308 | ||
| 309 | // Check for no rows modified |
|
| 310 | if ($this->conn->Affected_Rows() == 0) { |
|