sql update view code example
Example 1: create view
CREATE VIEW view_name AS SELECT id,category,MAX(created_at),content,title FROM table WHERE condition GROUP BY category
Example 2: sql update views +1
$sqlviews = "UPDATE vendors SET views = views + 1
WHERE id = '$v_id'";
if ($conn->query($sqlviews) === TRUE) { }