3raser Posted February 7, 2010 Share Posted February 7, 2010 Not sure if I should have asked this in my other topic :/ But how do I make it so this code: //display data $get = mysql_query("SELECT * FROM items WHERE changeprice > 0 ORDER BY changeprice DESC"); while ($row = mysql_fetch_assoc($get)) { // get data $changeprice = $row[changeprice]; echo '<tr class="row_b"> <td> <img name="object" src="'. $row[imagelink] .'" alt="'. $row[name] .'"> </td> <td> <a href="http://domination.comyr.com/viewitem.php?id='. $row[itemid] .'">'. $row[name] .'</a> </td> <td>'. $row[price] .'</td> <td class="t5"> <span class="rise"> '. $row[changeprice] .' Only echoes out 10 results? Quote Link to comment https://forums.phpfreaks.com/topic/191266-how-to-make-it-only-grab-10/ Share on other sites More sharing options...
jl5501 Posted February 7, 2010 Share Posted February 7, 2010 $get = mysql_query("SELECT * FROM items WHERE changeprice > 0 ORDER BY changeprice DESC limit 10"); Quote Link to comment https://forums.phpfreaks.com/topic/191266-how-to-make-it-only-grab-10/#findComment-1008476 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.