Hello my friends.
I have a fetchRow, that is done like it:
$db = new Database();
$data = $db->fetchRow($db->select()->where('id = ?',$id));
Done it, I would like to retrieve all the files from the file table, like this:
$files = new Database();
$photos = $files->fetchAll($files->select()->where('id = ?',$data->id));
But it returns two different objects, how can I add it to only one object?
If I do:
$this->view->photos = $photos;
$this->view->data = $data;
It works, but how can I merge the photos inside the data?
Thanks and best regards.