Try with this:
if ($stmt = $mysqli->prepare("SELECT COUNT(*) FROM TABLE WHERE columnA=? && columnB=?")) {
$stmt->bind_param("ss", $a, $b);
$stmt->execute();
$stmt->bind_result($count);
$stmt->fetch();
$stmt->close();
}
return ($count > 0 ? true : false);
Now you should be able to get it done