View Full Version : <b>Client-PHP Script for Instant Updates</b>

03-09-2008, 12:26 PM
Hello Every one!

I’ve created the script for sending some data, I am using query on my tables to get the values and than send it via socket_write and the data is being saved in server database
The only thing that confusing me more, is that if in my client database, there are some changes like updates and I want to send only the updated record what should I do?
Any Idea….?
Thanks in Advance
Numan Khan

03-09-2008, 11:59 PM
The best way would be to use a trigger. If you are using MySQL, triggers are available beginning with version 5.

Another way would be to add a column to your tables to indicate if a row has been changed, and then in your script that updates the server database, only select those rows where the update indicator is on.