Jump to content

Very puzzling...


korrupt_23

Recommended Posts

Hmm, well, I\'m really not sure why this coding isn\'t working.. and I\'m usually fair with mySQL.. but.. here goes..

 

Please tell me if you see anything wrong, even the smallest thing wrong in this code. The problem is it doesn\'t LIMIT to 5, only 1...

 


<?

@include("connect2.php");



$sql = "SELECT * FROM clicks ORDER BY \'unique\' DESC LIMIT 5";

$result = mysql_query($sql);

$number = mysql_numrows($result);



$i = 0;



$name = mysql_result($result,$i, "pagename");

$clicks = mysql_result($result,$i, "raw");

$unique = mysql_result($result,$i, "unique");



echo "

<TR>

<TD WIDTH="40%" ALIGN="CENTER">

$name

</TD>

<TD WIDTH="25%" ALIGN="CENTER">

$unique

</TD>

<TD WIDTH="30%" ALIGN="CENTER">

Download

</TD>

</TR>

";

$i++;

?>

 

Anything? Or any ideas? Thanks very much..

Link to comment
https://forums.phpfreaks.com/topic/1456-very-puzzling/
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.