sqlite returns column names as table.name, not just name

This commit is contained in:
Shish 2009-07-17 00:27:40 +01:00
parent 678910fb13
commit bc3c2d5a5b

View File

@ -29,7 +29,8 @@ class Image {
public function Image($row=null) {
if(!is_null($row)) {
foreach($row as $name => $value) {
// FIXME: some databases use table.name rather than name
// some databases use table.name rather than name
$name = str_replace("images.", "", $name);
$this->$name = $value; // hax
}
$this->posted_timestamp = strtotime($this->posted); // pray