Whats wrong with this query? For example $brand holds the value 'apple'
Then I get the error 'unknown column 'apple'
Can anyone see the problem?
if(isset($_GET['brand']) ? $_GET['brand'] : 0){
$brand = (isset($_GET['brand']) ? $_GET['brand'] : 0);
$sql = mysqli_query($link, "SELECT COUNT(id) FROM products WHERE brand = $brand AND
status = 1 ORDER BY id DESC")
OR die(mysqli_error($link));