Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 14th, 2012  |  syntax: None  |  size: 0.36 KB  |  hits: 10  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. $statistic_id = array_key_exists( 's', $_GET ) ? $_GET['s'] : 63;
  2.  
  3.   $sql = sprintf( "SELECT * FROM data WHERE day = DATE( NOW() - INTERVAL 1 DAY ) AND statistic_id = '%d' ORDER BY value DESC", $statistic_id );
  4.   $result = mysql_query( $sql );
  5.   $array = array();
  6.   while( $obj = mysql_fetch_object( $result ) )  {
  7.     $array[ $obj->player_id ] = $obj->value;
  8.   }