public static getMessageByUid ( string $userId = '-1' ) : array | ||
$userId | string | |
리턴 | array |
public static function getMessageByUid($userId = '-1')
{
$stn = DB::getInstance()->prepare("SELECT * FROM message WHERE LOCATE(?, pushUsers)>0 AND pushEndTime>? ORDER BY id ASC");
$stn->bindValue(1, $userId, DB::PARAM_STR);
$stn->bindValue(2, time(), DB::PARAM_INT);
$stn->execute();
return $stn->fetchAll(DB::FETCH_CLASS, __CLASS__);
}