简体   繁体   中英

how to check whether new data has been inserted in mysql table

does anybody have any idea how the Facebook notification works?

I have this code

(function retrieve_req() {
    $.ajax({
        url: 'request_viewer_and_its_utilities.php',
        success: function(data) {
            $('.internal_load_request_from_extern_page').html(data);
        },
        complete: function() {
            // Schedule the next request when the current one's complete
            setTimeout(retrieve_req, 500);
        }
    });
})();

the problem is that I want to send only one data and if it is found only the append the data any idea how to do that?

Easy :

In the result of request_viewer_and_its_utilities.php, you return the code, is 0 is OK, is not 0 is not OK, in the logic in request_viewer_and_its_utilities.php, use try , catch to control some exception to insert data.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM