hello there, i will try to explain what im trying to do on my website, people can add links with there websites but i want to add limit 3 links / website per 24 hours, so if they add just 1 or 2 or 3 in 24 hours to UPDATE the table from 3 or 2 or 1 to 0 im not sure if this is MySql or Php programming, hope someone made this before and can help me... dbtable : web_url table: |_weburl_______________|_number___________________| |http://www.test.com____|_2_________________________| so all what is from "number" to be reseted evry 24 hours if number: 0 == dont reset if number: 1/2/3 == reset after 24 hours to 0 so when the person add 3 links, he need to wait after 24 hours to can add again links
Simple Just use your PHP Time Function and intialize another one which subtracts 24 hours from it And once its over use UPDATE or ALTER to do the job
you have need to apply the validation tecnique on your table and write the procedure declaration web_url _var varchar2(10) begin I_ web_url=&web_url_var; if I_web_url>3; then dbms.output.putline("you have no permission to insert more url"); else insert into weburl(url varchar(10));