예제 #1
0
 public function GetLinks()
 {
     $link = new link();
     $sql = "\n\t\tSELECT lid, header, www, description, type, date\n\t\tFROM links\n\t\t";
     $stmt = DBConnection::getInstance()->Prepare($sql);
     if ($stmt = DBConnection::getInstance()->Prepare($sql)) {
         $stmt->execute();
         $result = $stmt->fetchAll(PDO::FETCH_OBJ);
     }
     if (is_array($result)) {
         foreach ($result as $object) {
             $m_links[] = $link->createLink($object->lid, $object->header, $object->www, $object->description, $object->type, $object->date);
         }
     }
     return $m_links;
 }