limit plugin help

paulknox

New Member
I have a form that I want users to be able to submit only once every 12 months. I have the limit plugin set-up on the form with the following.

User element: User ID
Limit length: 1

I'm trying to use the where clause to lookup the date then add 12 months... I have tried all sorts but the closed I have got is

DAYOFYEAR(passport.date_time)>DAYOFYEAR(CURDATE())

But of course this only works if the returned number is lower than the return date/time number.

I have tried DATEDIFF but this returns an error... Any thoughts??

Paul
 
P.S. You could get very very close with DATEDIFF (except for leap years):
Code:
DATEDIFF(CURDATE(), passport.date_time) < 365
 
P.P.S. If this helps you, could you please update the wiki screenshot and description to match the current plugin version by way of a thankyou.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top