i do have a column for views but i have do not know how the results would be inputed. how do i use that "update statement" you mentioned to input increment view amounts in my column? |
table_name has column for views.
page is a column in table that is used to dynamically display content based on title in URL parameter ie
website.com/?page=home
website.com/?page=about_us
etc.
Use query to update views+1 where page = the URL parameter that is entered into address bar to display the dynamic page content.
$page = "-1";
if (isset($_GET['page'])) {
$page = $_GET['page'];
$query_hits = sprintf("UPDATE table_name
SET views = views+1
WHERE page = %s", GetSQLValueString($page, "text"));
$hits = mysql_query($query_hits, $connection) or die(mysql_error());
}
best,
Shocker 