How could I make it so each time someone goes to a page it adds +1 to a field named 'pageviews' but only adds +1 to the the approriate ID.. i.e if page is page.php?id=3 .. +1 is only added to the field 'pageviews' for id 3.. everything ive tried just adds +1 to every row
is there anything i could add to this...
<?php
$page = $_GET['id'];
if ($page == true) {
$sql = 'SELECT * FROM article_list WHERE '. (int) $page .' = id';
if (!($results = mysql_query($sql))) {
die('Problem');
}
$data = mysql_fetch_array($results);
}
?>
is there anything i could add to this...
<?php
$page = $_GET['id'];
if ($page == true) {
$sql = 'SELECT * FROM article_list WHERE '. (int) $page .' = id';
if (!($results = mysql_query($sql))) {
die('Problem');
}
$data = mysql_fetch_array($results);
}
?>