pedrobcabral Posted April 16, 2007 Share Posted April 16, 2007 <?php $resultnoticias = mysql_query("SELECT * FROM noticias ORDER BY id DESC") or die(mysql_error()); $rownoticias = mysql_fetch_array( $resultnoticias ); while($rown = mysql_fetch_array($resultnoticias)){ echo $rown['id']; } ?> I have 5 entries on my table and this query only show 4 of them, it NEVER shows the last entry, why? Thank you. Link to comment https://forums.phpfreaks.com/topic/47254-what-is-missing/ Share on other sites More sharing options...
kenrbnsn Posted April 16, 2007 Share Posted April 16, 2007 Remove <?php $rownoticias = mysql_fetch_array( $resultnoticias ); ?> That is getting the first row, but you're not using it at all. Ken Link to comment https://forums.phpfreaks.com/topic/47254-what-is-missing/#findComment-230443 Share on other sites More sharing options...
pedrobcabral Posted April 16, 2007 Author Share Posted April 16, 2007 This are those kind of things that get me into nerves, i've been whatching the code for several minutes, it is so simple I and didn't figure out. Thank you. Link to comment https://forums.phpfreaks.com/topic/47254-what-is-missing/#findComment-230450 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.