| @@ 266-274 (lines=9) @@ | ||
| 263 | ||
| 264 | // Populate the syntax arrays |
|
| 265 | reset($vars); |
|
| 266 | while (list($key, $value) = each($vars)) { |
|
| 267 | $this->fieldClean($key); |
|
| 268 | $this->clean($value); |
|
| 269 | if ($setClause) { |
|
| 270 | $setClause .= ", \"{$key}\"='{$value}'"; |
|
| 271 | } else { |
|
| 272 | $setClause = "UPDATE \"{$table}\" SET \"{$key}\"='{$value}'"; |
|
| 273 | } |
|
| 274 | } |
|
| 275 | ||
| 276 | reset($nulls); |
|
| 277 | while (list(, $value) = each($nulls)) { |
|
| @@ 287-295 (lines=9) @@ | ||
| 284 | } |
|
| 285 | ||
| 286 | reset($where); |
|
| 287 | while (list($key, $value) = each($where)) { |
|
| 288 | $this->fieldClean($key); |
|
| 289 | $this->clean($value); |
|
| 290 | if ($whereClause) { |
|
| 291 | $whereClause .= " AND \"{$key}\"='{$value}'"; |
|
| 292 | } else { |
|
| 293 | $whereClause = " WHERE \"{$key}\"='{$value}'"; |
|
| 294 | } |
|
| 295 | } |
|
| 296 | ||
| 297 | // Check for failures |
|
| 298 | if (!$this->conn->Execute($setClause . $whereClause)) { |
|