Jump to content

annihilate

Members
  • Posts

    63
  • Joined

  • Last visited

Everything posted by annihilate

  1. This line: if(mysql_num_rows($players >= 1)){ Needs changing to: if (mysql_num_rows($players) >= 1) {
  2. You need to use mysql_connect function if you're connecting to a MySQL database. http://php.net/manual/en/function.mysql-connect.php
  3. $az = range('a', 'z'); $current_letter = 'f'; $current_key = array_search($current_letter, $az); $next_letter = ($current_key !== false && $current_key < (count($az) - 1)) ? $az[++$current_key] : ''; echo $next_letter; // prints g Would obviously need some work to handle what happens if the current letter isn't found in the array or when the letter is z. Currently will just assign next letter to be an empty string in these circumstances.
  4. Take a look at subdate: http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_subdate In your case, you could do the following and end the query with: WHERE rdate > SUBDATE(SYSDATE(), 1)
×
×
  • 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.