i73 Posted February 3, 2014 Share Posted February 3, 2014 $video_query = mysql_query( "SELECT video_name FROM video"); $video_info = mysql_fetch_array($video_query); while($video_info=mysql_fetch_array($video_query)){ $video_name=$video_info['video_name']; } I don't know why but It wont print the first thing in the array... Link to comment https://forums.phpfreaks.com/topic/285892-i-am-trying-to-print-arry-from-database-and-the-first-object-is-not-printing/ Share on other sites More sharing options...
jazzman1 Posted February 3, 2014 Share Posted February 3, 2014 Try, $video_query = mysql_query( "SELECT video_name FROM video"); //$video_info = mysql_fetch_array($video_query); while($video_info=mysql_fetch_array($video_query)){ $video_name=$video_info['video_name']; } Use mysql_error() to check for actual errors as well. Link to comment https://forums.phpfreaks.com/topic/285892-i-am-trying-to-print-arry-from-database-and-the-first-object-is-not-printing/#findComment-1467489 Share on other sites More sharing options...
i73 Posted February 3, 2014 Author Share Posted February 3, 2014 Your my fav! I thought I was doing something wrong with the two querys, I tried it without and still got the problem. It must have been my server not refreshing, yay! go gadaddy..... Link to comment https://forums.phpfreaks.com/topic/285892-i-am-trying-to-print-arry-from-database-and-the-first-object-is-not-printing/#findComment-1467491 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.