Barand Posted February 28, 2007 Share Posted February 28, 2007 Identical to your last post ??? Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted February 28, 2007 Share Posted February 28, 2007 Are you talking to me Barand? I added the while loop in there...nothing to drastic, but it was a change. Quote Link to comment Share on other sites More sharing options...
jadedknight Posted February 28, 2007 Author Share Posted February 28, 2007 Wow! Thank you guys so much, you have been so helpful haha. Man it works ok this is my code now.. $query="SELECT * FROM posts"; $result=mysql_query($query); while ($row = mysql_fetch_assoc($result)){ echo $row['id'].'<br>'; echo $row['title'].'<br>'; echo $row['author'].'<br>'; echo $row['date'].'<br>'; echo $row['content'].'<br>'; } I just want to make sure thats correct code to use. Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted February 28, 2007 Share Posted February 28, 2007 You could clean it up a bit... <?php $query="SELECT * FROM posts"; $result=mysql_query($query); while ($row = mysql_fetch_assoc($result)){ echo $row['id']; echo $row['title']; echo $row['author']; echo $row['date']; echo $row['content']; } ?> EDIT: Oh, I just relized that you may have just wanted to space them out with the ''. <?php $query="SELECT * FROM posts"; $result=mysql_query($query); while ($row = mysql_fetch_assoc($result)){ echo $row['id'].' '; echo $row['title'].' '; echo $row['author'].' '; echo $row['date'].' '; echo $row['content'].' '; echo '<p>'; } ?> Quote Link to comment Share on other sites More sharing options...
jadedknight Posted February 28, 2007 Author Share Posted February 28, 2007 Yeah for some reason the <br> tags didnt copy and paste..etc, one last thing When I use that, all the post information is all mushed together, where to I insert a break to separate each post. Quote Link to comment Share on other sites More sharing options...
Barand Posted February 28, 2007 Share Posted February 28, 2007 You could clean it up even more - see my reply #21 above Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted February 28, 2007 Share Posted February 28, 2007 The second code of my last post should fix that for you =) Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted February 28, 2007 Share Posted February 28, 2007 Oh, I see what you are saying Barand. I just wanted to give her something a little more simple than that just because she is newer and it would help her understand better. I am glad you posted that code though, it works beautifully and I hope you don't mind if I use it when I am coding Quote Link to comment Share on other sites More sharing options...
jadedknight Posted February 28, 2007 Author Share Posted February 28, 2007 YES! Wow thank you so much! *tears* lol. Man you guys rock. This is my first day here and already so much positiveness lmao. I will be back hopefully to help Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted February 28, 2007 Share Posted February 28, 2007 Everyone here is happy to help you XD Make sure to set this topic as "solved". Quote Link to comment Share on other sites More sharing options...
Barand Posted February 28, 2007 Share Posted February 28, 2007 I am glad you posted that code though, it works beautifully and I hope you don't mind if I use it when I am coding Feel free to use it. For greater functionality there's also the baaGrid link in my sig. Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted February 28, 2007 Share Posted February 28, 2007 Great =D Thanks Quote Link to comment 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.