Updating mysql database Taboo sex chats
If you do want to do this in the DB you have a couple options, My SQL Proxy and My SQL triggers.
I'm not sure if My SQL triggers can do anything other than execute SQL, but that could be sufficient, you could use them to create an 'updates' table and regularly poll that.
I would like to do this to create a ui with live updates.
will show details about when the table was last updated.
has been mentioned in other answers, adding triggers to the table is probably the most flexible solution. I have a table with around a million rows, using SELECT on it the reported time for fetching what I want is 0.00 sec , but using a handler it takes 5.04 sec.I think in My SQL you don't have to specify columns that have defaults when you INSERT.I was just curious if I could avoid polling at all. Would a timestamp_inserted column in the table help?If the new column timestamp_inserted defaulted to NOW() the code changes might not be too severe if you added that.Your trigger could update an audit table recording the changes, and then your app could poll the audit table to reflect any changes. What I really tried to find out was if I could avoid polling, but it seems that I perhaps just have to poll using SELECT and report to the ui when something changes.
[SELECT * from tbl WHERE alfa = 2 ORDER BY beta LIMIT 1] VS [HANDLER tbl READ key LAST WHERE alfa = 2] There are a couple ways you may be able to accomplish this, but my guess is that you'd be better off doing this in app code than in the database.