3
I’m trying to understand more about long Polling to "manipulate" a site in real time, I’ve seen some videos and I’m thinking so far:
Let’s say I have an old date that’s in sql and I do an echo on it.
How long Polling will know if the old date will not be the same that it will fetch from time to time according to the setInterval function...?
Let’s say I want to display a blog post where all the text is in mysql, but suddenly I publish a new post, and whoever is on the page on the spot, will see the post on the spot ( Ava )So how does a long code know the difference between the old publication and the new one? Even not to conflict or repeat the same date saved in sql.
Remembering I don’t know anything about long Ping, so I might be asking bullshit...
I’m beginning to understand, but then the site owner will have to specify the parameters every day?
– Kevin mtk
@Kevinmtk didn’t understand the question...
– Miguel Mesquita Alfaiate
How do I not repeat the posts
– Kevin mtk
@Kevinmtk if you need help should at least try to be more explicit. Repeat posts like? When? In what situation? What posts? Why are they repeated and where?
– Miguel Mesquita Alfaiate
I don’t need help, I need to learn about long Polling > PHP > pulling mysql > index.php, there is a date that is already in mysql with echo $Row[... ], and if long can pull the same old dates that are already in mysql as just quoted in this comment?
– Kevin mtk
How will I make you search for the date with last timestamp inserted in the last mysql id
– Kevin mtk
@Kevinmtk As I said in my reply, after receiving the information from the most recent posts (through Javascript for example), we call back the page that returns the results, with a parameter that should be the ID or the date of the last post obtained, thus avoiding receiving duplicate information again. PS: This is a question and answer forum, where concrete questions are answered. To learn the language is studied and tutorials are sought on the subject.
– Miguel Mesquita Alfaiate
Got it, P.S, I n understand reading pq on the net only have examples of what a situation I will never go through my life to study, so I prefer simple examples, that’s how I learned already html, css, php basics, js basics.
– Kevin mtk