pgsjoe Posted August 10, 2006 Share Posted August 10, 2006 so I'm already using this....[code] $result = @mysql_query('SELECT * FROM `vince` WHERE `display` = "yes" GROUP BY showdate ASC, pk ASC'); if (!$result) { exit('<p>Error performing query: ' . mysql_error() . '</p>'); }while ($row = mysql_fetch_array($result)) {[/code]to pull from my database. But I only want to return the first 3 results by date. How? Thanks in advance. Quote Link to comment Share on other sites More sharing options...
king arthur Posted August 10, 2006 Share Posted August 10, 2006 Add LIMIT 3 on the end of your query. Quote Link to comment Share on other sites More sharing options...
litebearer Posted August 10, 2006 Share Posted August 10, 2006 perhaps use [b] LIMIT 3[/b]day late dollar short :) Quote Link to comment Share on other sites More sharing options...
pgsjoe Posted August 10, 2006 Author Share Posted August 10, 2006 I'm not well versed in SQL or PHP! Thanks guys. You rule! 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.