| 1234567891011121314151617181920212223242526272829 |
- <?php
- class admin_updater_model extends Model {
-
- public function update_field($table,$field,$value,$id,$key) {
- $table = $this->escapeString($table);
- $field = $this->escapeString($field);
- $value = $this->escapeString($value);
- $id = $this->escapeString($id);
- $key = $this->escapeString($key);
- $this->execute("UPDATE ".$table." SET ".$field."='".$value."' WHERE ".$key."='".$id."';");
-
- return true;
- }
-
-
- public function update_multiple_field($table,$field,$value,$id,$key) {
- $table = $this->escapeString($table);
- $field = $this->escapeString($field);
- $value = $this->escapeString($value);
- $id = $this->escapeString($id);
- $key = $this->escapeString($key);
-
- $this->execute("UPDATE ".$table." SET ".$field."='".$value."' WHERE ".$key."=".$id.";");
-
- return true;
- }
-
- }
|