Jump to content

I want to select the highest scores from a database


Rosst

Recommended Posts

I want to select the highest scores from a database, it's from a PHP/MySQL/Flash snake game, see here: http://vexxon.net/index.php? the bottom right content thingy has the snake high scores, but it's not in order, how would I put them in order?
Thanks in advance for the help.
Link to comment
Share on other sites

I use the same thing, it doesn't work, except I have asc instead on desc
[code=php:0]<?php
include("config.php");
$a = mysql_query("select * from snake order by score asc limit 5");
while ($b = mysql_fetch_array($a)) {
echo "<a href=\"index.php?id=memb&user=".$b[uname]."\">".$b[uname]."</a> - ".$b[score]."<br />";
}
if ($logged[username]) {
echo "Play snake: <a href=\"snake/snake.swf\">Link</a>";
}
?>[/code]
Link to comment
Share on other sites

lol the irony that you have PHP tutorials on your site... well that and your flash logo is illegable...

just so you know descending means it starts big and gets small at this very moment the list isnt in desc order....  furthermore you will need to explain WHAT is not working... saying ITS NOT WORKING will do no good and is the reason why "none of (us) are helping you"
Link to comment
Share on other sites

Just so you know, using plain text as a CAPTCHA doesn't secure it at all, because anyone who was automating the registration process (presumably what you are trying to avoid, or does it just look cool?) could easily read that text from the page with a computer.  That is the idea behind CAPTCHA:  Completely Automated Public Turing test to tell Computers and Humans Apart. 

Check this:

http://evolt.org/securing_forms_random_image
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.