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);