lill87 Posted October 25, 2007 Share Posted October 25, 2007 Im currently trying to make a online text roleplaying game, and im having trouble making a script, ill try to explain it. I want a user to gain 5 "Energy" each 10 minutes, even when the user is not logged in. Now how do i make that in MySQL / PHP? Ive tried many things but cant figure it out, and i cant find any tutorial about it. And how do i make a IF sentence with time? example. ANY time after 30th of october 2008, "something happens". I cant do like: if (X > 30-10-08) { thinghappens(); } So how do i make it? please help, I would be VERY grateful! Thanks // lill87 Link to comment https://forums.phpfreaks.com/topic/74810-mysql-php-time-questions/ Share on other sites More sharing options...
Barand Posted October 26, 2007 Share Posted October 26, 2007 to compare dates you need to use yyyy-mm-dd (or yyyymmdd) format. (MySQL uses YYYY-MM-DD for its DATE columns) Link to comment https://forums.phpfreaks.com/topic/74810-mysql-php-time-questions/#findComment-378300 Share on other sites More sharing options...
Barand Posted October 26, 2007 Share Posted October 26, 2007 Don't waste our time by posting the same question in more than one forum. DON'T double post. DO read the forum guidelines. Link to comment https://forums.phpfreaks.com/topic/74810-mysql-php-time-questions/#findComment-378328 Share on other sites More sharing options...
Recommended Posts