php - limiting user actions by months -


Upload all uploads in mysql with my user photo information and date information. I want to restrict uploads for months Can upload 3 photos in a month. What is the best way to do this?

Cheers

Use:

  SELECT YEAR (t.ur_date_field) AS yr, as month_number, COUNT (*) as num_photos by Ur_TT Group by year (T.RU_Datafield), MONTH (T.RU_Datafield)) by order Year, month_number  

... to get:

  yr | Month_number | Num_photos -------------------------------- 2010 1 | 2 2010 2 | 1  

If there are no photos for a given month, it will not appear in an insecure form.

From there, you can validate this month special.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -