简体   繁体   English

如何检查新数据是否已插入到mysql表中

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

does anybody have any idea how the Facebook notification works? 有谁知道Facebook通知的工作方式吗?

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. 在request_viewer_and_its_utilities.php的结果中,您返回代码,是0可以,不是0不能,在request_viewer_and_its_utilities.php中的逻辑中,使用try,catch控制某些异常来插入数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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