I'm having issues getting 2 different row counts by using a conditional statement.
$sql = select sum(id = :id AND category = :cat) as count1,
sum(category = :cat) as count2
from furniture;
$stmt = $connectdb->prepare($sql);
$stmt->execute(array(':id'=>$id, ':cat'=>"1"));
$resulta = $stmt->fetchAll(PDO::FETCH_ASSOC);
$rowCount1 = count(count1);
$rowCount2 = count(count2);
How do I get the count value of count1 or count2?