Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Mar 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    <b>Client-PHP Script for Instant Updates</b>

    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

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •