|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
You don't need a fax machine to get faxes. Get a fax-to-email fax number from CallWave. Try it free.
|
|
#1
|
|||
|
|||
|
Database Flood Protection?
Hello,
On my website I have a newssection where people can post login and post newsitems and comments. Since there are some people abusing this service, I would like to have some kind of flood protection. It should be able to count the number of posts of a user (which is not the hard part). When this number reaches a certain amount within a certain fixed time, the user should be prohibited to post another newsitem. So some kind of counter that increases within a certain amount of time...-ish...uh, not sure if I explained it correctly. Anyway, it comes down to this: A user should be able to post 2 items within 5 minutes and not more ![]() Also, is there an easy way (maybe an mysql command) to increase a value in a MySQL database? So without reading the value first and then adding 1... thanks in advance! P3x |
|
#2
|
|||
|
|||
|
If you are farmiliar with the currently on-line system (to show you who is currently on-line), you should have no problem. Just make another table that saves the users name and the time of his last post in your news section. If a user posts too many times in 5 minutes he is the notified. Everytime another user posts the script should look through the above mentioned table and delete the users who haven't been active in the news section for more than 5 minutes. That's about it I think...
Regarding the SQL query to update a single column by incrementing it by one, try something like this. Quote:
For more info on UPDATE check this site. |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Database Development > Database Flood Protection? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|