[FX.php List] Export Records to Excel/CSV - with limitation

John Moed john at technames.com
Thu Mar 29 17:18:16 MDT 2007


I would like to give my users the ability to download records in my database
to Excel or CSV but also limit them to 200 records a month (so they don't
download my entire database). I have a working Export to csv, and I know how
to limit the downloads, but I can't figure out how to set up the DB to
record the number downloaded and calculate how many downloads remaining for
this month and then, at the beginning of the new month, have the downloads
available reset to 200.

I could have 3 fields in a downloads table, one being month.year and create
a new record for each download date. The program could then add up the
number of downloads this month and subtract that number from 200 to see what
is available.

My major point of confusion is how to tell if "today" is part of this month.

Any suggestions?

Thanks,
John Moed
www.technames.com





More information about the FX.php_List mailing list