Answer the question
In order to leave comments, you need to log in
How to allow only 10 records per day in PostgreSQL?
Hello, I'm interested in the question, with a certain action, I save the user's IP in the database, I need to make a daily limit. That is, 10 actions (and records in the database) per day, how can this be done? I had a command for MySQL, but it didn't work :(
SELECT COUNT(*) FROM `votes_log` WHERE date > DATE_SUB(NOW(), INTERVAL 3 DAY) AND user_id=?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question