I do not understand much about PHP and I have a problem that I can not solve.
Site ERROR
Notice: Object of class PDOStatement could not be converted to int in orcamento.php on line 63
Code referring to the line that is giving error I left a mark where the line 63 is located
<?php
$sql_sb = "SELECT * FROM tbl_album WHERE ALBUM_STATUS = 1 ORDER BY ALBUM_NOME ASC";
$b = $con->query($sql_sb);
$nRows = $con->query($sql_sb);
$i = 3;
?>
<table>
<?php
**linha 63 aqui** if($nRows > 0){
while($busca = $b->fetch(PDO::FETCH_ASSOC)){
if($i % 3 == 0){
echo '<tr>';
}
echo '<td>';
echo '<li><input type="checkbox" value="'.$busca['ALBUM_NOME'].'">'.$busca['ALBUM_NOME'].'</li>';
echo '</td>';
//echo '</tr>';
$i++;
}
}else{
echo "Não há produtos cadastrados";
}
?>
Thank you