This is my code:
$sql = "SELECT count name_id, name FROM TABLE WHERE tag1 in ('$tag1') OR tag2 in ('$tag1') $andor tag2 in ('$tag2') OR tag1 in ('$tag2') ORDER BY rating desc LIMIT 5 OFFSET 0";
$result = $conn->query($sql);
And now, I want to echo the number of name_id. So, what to do?
Make new line something like this: $sql = "SELECT count(name_id)
echo $sql;