📜  跟踪查看次数 php 代码示例

📅  最后修改于: 2022-03-11 14:54:28.900000             🧑  作者: Mango

代码示例1
$sample_rate = 100;
if(mt_rand(1,$sample_rate) == 1) {
    $query = mysql_query(" UPDATE posts SET views = views + {$sample_rate} WHERE id = '{$id}' ");
    // execute query, etc
}