Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[PHP] Auction Script "Difference/Count-down"

Junior Spellweaver
Joined
Feb 23, 2008
Messages
131
Reaction score
1
Hey guys im working on this small auction script for a game so users can put there items and sell for in game money but im having trouble with the dates posted, count down, thats about it for now is there someone that could help me with this i dont want someone to do it for me most likey to show me or teach me will help or a good explanation on it thanks
 
Last edited by a moderator:
Legendary Battlemage
Loyal Member
Joined
Apr 7, 2009
Messages
647
Reaction score
25
Re: AUction script

You know, you are wasting your time right?
It's kind of obvious that you haven't been googling for the answer.

No one's going to help you, unless you've tried looking for an answer, or you don't ask for people to just give you the source code.
 
Junior Spellweaver
Joined
Feb 23, 2008
Messages
131
Reaction score
1
Re: AUction script

Im not asking anyone to make a source code for me i been googling i already wrote most the script my self just needed help with mysql thats all if your not going to help dont bother posting.
 
Junior Spellweaver
Joined
Feb 23, 2008
Messages
131
Reaction score
1
Re: AUction script

i have done posting the item and viewing the item i just need the time/date count down or difference so it knows when to select highest bidder like if someone could explain that part that would help

But yea i have Posting the item, stats of item, starting price ect and when someone is looking for an item i have it show all items in DB i just dont have what i said up top
 
Joined
Jun 8, 2007
Messages
1,985
Reaction score
490
Re: AUction script

You mean you want to stop showing items once they're expiration timestamp/datetime in the db is before the current time? Or what do you mean by, ".. need the time/date count down or difference.."
 
Last edited:
Junior Spellweaver
Joined
Feb 23, 2008
Messages
131
Reaction score
1
yes thats what im trying to say i didnt know how to explain it thanks for getting it
 
Junior Spellweaver
Joined
Feb 23, 2008
Messages
131
Reaction score
1
ok i got it so it stores time in the Mysql using DATETIME + the duration so it automaticly adds 3 days and stores it but now how do i show how much time is left is it something like $enddate - now()??? if someone could help me that would be great
 
Skilled Illusionist
Joined
Apr 6, 2007
Messages
384
Reaction score
2
ok i got it so it stores time in the Mysql using DATETIME + the duration so it automaticly adds 3 days and stores it but now how do i show how much time is left is it something like $enddate - now()??? if someone could help me that would be great

If you're storing times in php just use the time() function and convert it to something readable using date() when you pull it from the DB (if you need to read it). If just php is messing with it keep it in time() format. Easier to compare.
 
Infraction Baɴɴed
Loyal Member
Joined
Apr 9, 2008
Messages
1,416
Reaction score
169
PHP:
date("F j, Y, g:i a", time());
have fun with that.

and if you want to add time just do this:
PHP:
date("F j, Y, g:i a", ((time() + (30 * 60)));
that adds 30 minutes to the time it currently is. hope you get it.

EDIT:
more help with the date function?

more help with the time function?
 
Last edited:
Junior Spellweaver
Joined
Feb 23, 2008
Messages
131
Reaction score
1
EDIT: NVM i figure that part out too :)
 
Last edited:
Back
Top