Hello, I'd like some help with the command below. I'm trying a read in a database table but I can not do while
because it only shows the last record.
Note: Using vardump
it shows loop
normal.
<?
class AppNoticiasDestaque{
function AppNoticiasDestaque() {
$verQ = "SELECT * FROM noticias";
$ver = mysql_query($verQ) or die(mysql_error());
if(mysql_num_rows($ver) > 0) {
while($verRow = mysql_fetch_array($ver)) {
var_dump ($this->AppNoticiasDestaque = $verRow);
}}
@mysql_free_result($ver);
}
}
?>
//resgatando o resultado
<?=$obj->AppNoticiasDestaque['titulo_noticia'] ?>