Jump to content

Millar

Members
  • Posts

    40
  • Joined

  • Last visited

Posts posted by Millar

  1. I have this piece of code to see if a user was active in past 15 mins.
    [code]mysql_query ( "SELECT * FROM reg WHERE lastactive>='" . date ( "U" ) - 900 . "'" );[/code]

    But this code doesn't work, how could I query using more than?
  2. I have this piece of code so far to order by the power...

    [code]$result = mysql_query("SELECT * FROM reg ORDER BY power DESC") ; 

    print "<table>";
    print "<tr> <th>Name</th></tr>";
    // keeps getting the next row until there are no more to get
    while($row = mysql_fetch_array( $result )) {
    // Print out the contents of each row into a table
    print "<tr><td><a href='index.php?act=stats&id=" . $row['id'] . "'>";
    print $row['user'];
    print "</a></td></tr>";
    }

    print "</table>";[/code]

    But, how can I get the position in the array the particular name is, so it is displayed like a ranking by power.

    Thanks.
  3. Well, I was wondering if anyone could give me a script I can use to get a entered value from a post form (e.g Username) and check to see if the username exists in a plain txt file I have with usernames separated by a line break, thanks in advanced.
    Millar.
×
×
  • 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.