Jump to content

How to make it only grab 10?


3raser

Recommended Posts

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?

Link to comment
https://forums.phpfreaks.com/topic/191266-how-to-make-it-only-grab-10/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.