/** *Retorna um registro da tabela directories definido pelo campo directory_id * *@param Links */ function getInHomeLinks($link) { $strsql = "SELECT * FROM user_links WHERE user_id = " . $link->getUser_id() . " and in_home=1 order by rate desc"; $result = $this->_db->databaseQuery($strsql); $linkList = array(); for ($i = 0; $i < count($result); $i++) { $link = new Links(); $link->setLink_id($result[$i]['link_id']); $link->setUser_id($result[$i]['user_id']); $link->setName($result[$i]['name']); $link->setUrl($result[$i]['url']); $link->setDescription($result[$i]['description']); $link->setInHome($result[$i]['in_home']); $link->setRate($result[$i]['rate']); array_push($linkList, $link); } return $linkList; }