sql语句实现每日资格设置

CREATE TABLE 'iDayAuth'(
    'openid' VARCHAR(16) NOT NULL ,
    'iStamp' INT(10) NOT NULL,
    'iDayAuth' SMALLINT NOT NULL DEFAULT "3"
)
$cSql = sprintf("UPDATE 'iDayAuth' SET `iDayAuth`= 3,`iStamp`=now() WHERE `openid`='%s' AND to_Days(`iStamp`)!=to_Days(now()),$openid);    

 

posted @ 2016-03-29 17:36  雨落知音  阅读(122)  评论(0编辑  收藏  举报