Compare Revisions
Last modification
- Rev 35 2012-11-08 03:12:33
- Author: PointedEars
- Log message:
* AbstractModel.php
- map(): Force parameters to be arrays, no user-defined exceptions necessary
* Application.php
- Fixed PHPDoc
* Table.php
- find($id) returns empty array or first item
/trunk/Db/Table.php |
226,6 → 226,7 |
* Finds a record by ID |
* |
* @param mixed $id |
* @return array |
*/ |
public function find($id) |
{ |
235,6 → 236,13 |
debug($id); |
} |
|
return $this->select(null, array($this->_id => $id)); |
$result = $this->select(null, array($this->_id => $id)); |
|
if ($result) |
{ |
$result = $result[0]; |
} |
|
return $result; |
} |
} |