public static function LoadByIdContestEntry($intidFormAnswer) { $sql = sprintf("SELECT * FROM %s WHERE idContestEntry = %s;", self::TABLE_NAME, $intidFormAnswer); $result = LoadDriver::query($sql); $coll = new BaseEntityCollection(); while ($data = mysql_fetch_assoc($result)) { $tObj = new ContestFormAnswer(); $tObj->materilize($data); $coll->addItem($tObj); } return $coll; }
public static function LoadAll() { $sql = sprintf("SELECT * FROM %s;", self::TABLE_NAME); $result = LoadDriver::query($sql); $coll = new BaseEntityCollection(); while ($data = mysql_fetch_assoc($result)) { $tObj = new Attachment(); $tObj->materilize($data); $coll->addItem($tObj); } return $coll; }
public static function LoadByFbuid($strFbuid) { $sql = sprintf("SELECT * FROM %s WHERE fbuid = %s %s;", self::TABLE_NAME, $strFbuid, $str); $result = LoadDriver::query($sql); $coll = new BaseEntityCollection(); while ($data = mysql_fetch_assoc($result)) { $tObj = new ContestFormFieldType(); $tObj->materilize($data); $coll->addItem($tObj); } return $coll; }
public static function LoadAll($blnIncludeArchived = false) { if ($blnIncludeArchived === false) { $strExtra = ' WHERE delDate IS NULL'; } elseif ($blnIncludeArchived === true) { $strExtra = ' WHERE delDate IS NOT NULL'; } elseif (is_null($blnIncludeArchived)) { $strExtra = ''; } $sql = sprintf("SELECT * FROM %s %s;", self::TABLE_NAME, $strExtra); $result = LoadDriver::query($sql); $coll = new BaseEntityCollection(); while ($data = mysql_fetch_assoc($result)) { $tObj = new ContestEntry(); $tObj->materilize($data); $coll->addItem($tObj); } return $coll; }