Page 1 of 1

Categorys & Date functions

Posted: Sat Sep 01, 2007 10:01 am
by nabberuk
Right, a couple of things i'd like a little advice on.

Firstly, I'm doing a subscription based login system. When the user signs up, they get 365 days credit. Was is the best method of removing 1 credit off everyday on 100's of users. The data is stored in a mysql db.

Secondly, I'll be having a directory/categorys (like how ebay has). Whats the best way to about this?

Many thanks.


Nathan

Re: a little advice

Posted: Sat Sep 01, 2007 10:17 am
by volka
nabberuk wrote: When the user signs up, they get 365 days credit. Was is the best method of removing 1 credit off everyday on 100's of users.
You yould store the expiration date instead of the amount of credits.

Re: a little advice

Posted: Sat Sep 01, 2007 1:29 pm
by nabberuk
volka wrote:
nabberuk wrote: When the user signs up, they get 365 days credit. Was is the best method of removing 1 credit off everyday on 100's of users.
You yould store the expiration date instead of the amount of credits.
Would i be able to work out how many days are left?

Posted: Sat Sep 01, 2007 1:38 pm
by califdon
Datediff()

Posted: Mon Sep 03, 2007 11:20 am
by nabberuk
califdon wrote:Datediff()
when using the datediff function i get the following;

Code: Select all

Fatal error: Call to undefined function datediff() in C:\xampp\htdocs\datetest.php on line 5
Is datediff available in PHP Version 5.2.3?

EDIT: is datediff a mysql or php function? agh, im confused.

Many thanks.

Posted: Mon Sep 03, 2007 12:43 pm
by josa