joecooper Posted February 26, 2006 Share Posted February 26, 2006 ill try make it simple :).i have this:$sql="SELECT * FROM carspage ORDER BY id desc";$query=mysql_query($sql);$row=mysql_fetch_array($query);while ($row=mysql_fetch_array($query)){// code showing rows from database}and it only shows all the rows but not the first one. when i add another entry, it shows all but that one also. and so on... whats wrong with it? Quote Link to comment https://forums.phpfreaks.com/topic/3605-while-rowmysql_fetch_arrayquery/ Share on other sites More sharing options...
wickning1 Posted February 26, 2006 Share Posted February 26, 2006 $row=mysql_fetch_array($query);Delete that line from above your while loop. Quote Link to comment https://forums.phpfreaks.com/topic/3605-while-rowmysql_fetch_arrayquery/#findComment-12494 Share on other sites More sharing options...
joecooper Posted February 26, 2006 Author Share Posted February 26, 2006 ooooooohhhhhhhhhhhhhhhhh! dont belive i missed that! :( thanks! Quote Link to comment https://forums.phpfreaks.com/topic/3605-while-rowmysql_fetch_arrayquery/#findComment-12495 Share on other sites More sharing options...
azfar siddiqui Posted March 9, 2008 Share Posted March 9, 2008 you have fetched the first row already... Quote Link to comment https://forums.phpfreaks.com/topic/3605-while-rowmysql_fetch_arrayquery/#findComment-487551 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.