0
I do not understand much of the PHP part and I have a little problem that I am not able to solve.
WEBSITE ERROR
Notice: Object of class PDOStatement could not be converted to int in orcamento.php on line 63
Code referring to line that is giving error I left marked 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
My, my, my, I didn’t really notice that part.
– Willian Tártaro
Thank you very much, it helped a lot !!!
– Willian Tártaro
Quite normal, especially at the beginning. That’s how you learn. Good luck on this walk.
– Mauro Alexandre