I have a mySQL that is continuously being added to and I need to make an AJAX function that checks the database periodically and only returns the results that it hasn't seen before.
clbembry
0
Newbie Poster
Recommended Answers
Jump to PostDefine "returns results that it hasn't seen before". Surely you don't want to try to store the results of every query, per session, and do a comparison in real time. You want to do this work at the database level. You should add a timestamp field or some other field …
Jump to PostHave a status field that shows 0 when added. Change to 1 when retrieved. So on new ajax request ask for all records that are 0 and then immediately change them to 1. There's an outside chance that you'll miss an entry between two queries so if you're worried about …
All 8 Replies
tgreer
189
Made Her Cry
Team Colleague
diafol
tgreer
189
Made Her Cry
Team Colleague
diafol
cjohnweb
14
User Title? What's that?
diafol
tgreer
189
Made Her Cry
Team Colleague
Brillig
0
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.