Dear friends, need to fix following code.
when i execute following sql code views count is not updating??
require('db.php');
$id=$_REQUEST['id'];
$query = "update files SET views = views+1 where id ='".$id."'";
$query = "SELECT * from files where id='".$id."'";
$result = mysqli_query($con, $query) or die ( mysqli_error());
$row = mysqli_fetch_assoc($result);
when i execute following sql code views count is not updating??
require('db.php');
$id=$_REQUEST['id'];
$query = "update files SET views = views+1 where id ='".$id."'";
$query = "SELECT * from files where id='".$id."'";
$result = mysqli_query($con, $query) or die ( mysqli_error());
$row = mysqli_fetch_assoc($result);
Comment