dprichard Posted July 24, 2007 Share Posted July 24, 2007 Okay, I am trying to convert from using Dreamweaver PHP to hand coding stuff and am having problems with this. I am trying to repeat this line of code for just the first 3 records. <?php do { ?><p><?php echo $row_newsinfo['newstitle']; ?></p> <p><?php echo $row_newsinfo['newsbody']; ?></p> <p><a href="insurance-employee-benefit-news.php?newsid=<?php echo $row_newsinfo['newsid']; ?>">Read the full story >></a></p><br> <p><img src="../images/hr_small_right.jpg" width="239" height="3"></p><br><?php } while ($row_newsinfo <= 3) ?> Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted July 24, 2007 Share Posted July 24, 2007 If you are only wanting the first 3 records, add a LIMIT 3 clause to your mysql query. 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.