public static function getByUserId($userid) { $stm = DB::sql("SELECT * FROM `orders` WHERE `uid`=? AND status = 0"); $stm->bindValue(1, $userid, DB::PARAM_INT); $stm->execute(); return $stm->fetchAll(DB::FETCH_CLASS, __CLASS__); }