Imtehbegginer Posted October 3, 2007 Share Posted October 3, 2007 <?php include('includes/config.php'); $connect = mysql_connect($config['host'], $config['user'], $config['pass']); $database = mysql_select_db($config['name']); $query = mysql_query("SELECT * FROM rosecms_news"); $news = mysql_fetch_array($query); echo '<H1>'.$news['title'].'</h1>'; echo $news['date']; echo '<BR>'; echo '<BR>'; echo $news['content']; ?> That is my code above... how can I return the next set of data? If I re-do the script, it returns the exact same data. Link to comment https://forums.phpfreaks.com/topic/71732-solved-return-more-rows/ Share on other sites More sharing options...
marcus Posted October 3, 2007 Share Posted October 3, 2007 while($news = mysql_fetch_array($query)){ echo '<H1>'.$news['title'].'</h1>'; echo $news['date']; echo '<BR>'; echo '<BR>'; echo $news['content']; echo "<br><br>\n"; } in replace of: $news = mysql_fetch_array($query); echo '<H1>'.$news['title'].'</h1>'; echo $news['date']; echo '<BR>'; echo '<BR>'; echo $news['content']; Link to comment https://forums.phpfreaks.com/topic/71732-solved-return-more-rows/#findComment-361230 Share on other sites More sharing options...
Imtehbegginer Posted October 3, 2007 Author Share Posted October 3, 2007 That was a really fast reply. Thanks! Link to comment https://forums.phpfreaks.com/topic/71732-solved-return-more-rows/#findComment-361232 Share on other sites More sharing options...
marcus Posted October 3, 2007 Share Posted October 3, 2007 Fo sho. Link to comment https://forums.phpfreaks.com/topic/71732-solved-return-more-rows/#findComment-361233 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.