خرید بک لینک

Vote count: 0

i am working on a project with node.js(not express) server and mysql database. So what it does is that when user clicks a desired button on html page,it uploads 2 values (say SpecificName, Yes/No). Now these values goes in the mysql database through node server.Later mysql runs a check for the specificName column(if no then creates a column with the same Name) and updates the second value in it.

Now i would like to keep every update of the second value that the user makes through website (i.e yes) for 5 minutes in mysql after which it automatically updates the the specific location with another value (say cancel).I'm auspicious in solving every thing except this 5 minutes paradox.Also I'm keeping 15-20 so called specificName columns in which the value (say yes/no) is being updated and at the same time there are more than 1000 rows that are working simultaneously so a lots of 5 minute timers going on for the values.Is there a way to store value temporarily in mysql after which it is destroyed automatically?.

I came across : 1)node-crons(too complex,dnt even know if its a right choice), 2)mysql events(idk how to use it with node), 3)timestamp(can't create more than one timestamp(guess i need one for each column)), 4)datetime(haven't tested it yet).and other things like (DELETE FROM table WHERE timestamp > DATE_SUB(NOW(), INTERVAL 5 MINUTE)). Now i hv no idea what to use or how to resolve this dilemma. PLZZ HELP.

asked 2 mins ago

- - , .

برچسب: نویسنده: استخدام کار تاريخ: پنجشنبه 29 بهمن 1394 ساعت: 4:25

صفحه بندی