db = new PDO; $this->config = Config::get(); $this->table = new Table; $this->opt = new \stdClass(); $this->opt->sort = "DESC"; $this->opt->logic = "AND"; } public function getMetadataThumbById($id) { if (!\Sookon\Helpers\Uuid::test($id)) { $where = " m.id=$id "; } else { $where = " m.uuid='$id' "; } $sql = "select t.* from thumbnail t left join metadata m on t.id=m.id where ".$where; $thumb = $this->db->query($sql); return $thumb->fetch(); } }