10.03.2013, 21:28
Hello. I had a mysql timestamp problem. I create mysql tables - Timesta(TIMESTAMP) and Expire(TIMESTAMP)
Now i'am creating code who check time expires or not.
I create 1sec timer who check.
But when i put 1000sec. After 1sec i got message "vip time expires". Anyone can help me? And sorry for bad english
Now i'am creating code who check time expires or not.
Код HTML:
stock VipCheck2(playerid) { new sql[ 128 ]; format ( sql, sizeof ( sql ), "SELECT * FROM vips WHERE Vipas = '%s'", pName(playerid) ); mysql_query( sql ); mysql_store_result( ); while(mysql_retrieve_row()){ new expire; mysql_fetch_field_row ( sql , "Expire" ) ; expire = strval(sql); if(gettime() >= expire) { PlayerInfo[playerid][pVip] = false; M(playerid,"Vip time expires!"); //format(jQuery,MAX_QUERY_LENGTH,"DELETE FROM vips WHERE Vipas='%s'",pName(playerid)); //mysql_query(jQuery); } }
But when i put 1000sec. After 1sec i got message "vip time expires". Anyone can help me? And sorry for bad english