0
How do I update a query with data that was entered in the BD after the last query?
Simple example is a social network: You are viewing existing data, and when there is a new post, this is inserted in the top of the current view.
0
How do I update a query with data that was entered in the BD after the last query?
Simple example is a social network: You are viewing existing data, and when there is a new post, this is inserted in the top of the current view.
Browser other questions tagged php jquery
You are not signed in. Login or sign up in order to post.
Using
SELECT [field] FROM [data_base].[dbo].[table] ORDER BY [filed] DESC
or, instead ofDESC
useASC
. This using SQL Server, but the clauseORDER BY [field] ASC/DESC
is from the SQL language.– StillBuggin
@Eduardoalmeida I think that’s not quite what he just wants to know. This query only orders the table. He wants to know how to check new "updates" in the table, via the informed languages.
– user28595
In that case, he only needs to wear one
set_timeout()
to require from the database every X seconds or minutes a new update. All done by AJAX. See also Historyjs. https://github.com/balupton/history.js– StillBuggin
When it comes to consultation, it’s quiet. But I could not implement a "flag" referencing and saving the time of the last query and when to use set_timeout() for the next query, collect only the new entries from.
– RRV