剛剛得到幫助,使我的瀏覽量的代碼工作...現在我想瀏覽量只計數1爲每個會話/ IP。Mysql瀏覽量每次會話更新
在我用戶(news.users)表,我有可以使用這些細胞:(試圖建立一些早期沒有工作了所以這些未使用)
ip_reg, ip_visit, dtreg, dtvisit, visits, pass
代碼我有一個現在的工作看起來像這樣:
//Adds one to the counter
mysql_query("UPDATE news SET posts = posts + 1, published=published, last_edit=last_edit WHERE id=$id");
//Retreives the current count
$count = mysql_fetch_row(mysql_query("SELECT posts FROM news WHERE id=$id"));
//Displays the count on your site print
echo "<label>Viewed: ";
echo $count[0];
echo " times</label>";
?>
我可以使用一些在用戶未使用的細胞來自重新加載頁面以獲取一個網頁上獲得更高的觀點停止用戶?我該怎麼做:P
@ Ronald01990任何建議:P – Milla 2014-12-07 13:15:45