Changeset 3167
- Timestamp:
- 07/20/2008 06:52:52 PM (4 months ago)
- Files:
-
- 1 modified
-
trunk/system/libraries/ORM.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/libraries/ORM.php
r3125 r3167 601 601 public function delete($id = NULL) 602 602 { 603 if ($this->loaded === TRUE) 604 { 605 // Delete this object 606 $this->db->where($this->primary_key, $this->object[$this->primary_key])->delete($this->table_name); 607 } 603 if ($id === NULL AND $this->loaded) 604 { 605 // Use the the primary key value 606 $id = $this->object[$this->primary_key]; 607 } 608 609 // Delete this object 610 $this->db->where($this->primary_key, $id)->delete($this->table_name); 608 611 609 612 return $this->clear();
