Displaying SQL Results

From: Date: Fri, 08 Sep 2006 18:58:46 +0000
Subject: Displaying SQL Results
Groups: php.db 
Request: Send a blank email to php-db+get-42330@lists.php.net to get a copy of this message
Hi all, Can anyone tell me what the syntax would be to display or gather the results of this SQL? SELECT MAX(user), COUNT(*) FROM my_table GROUP BY user ASC; $sql_records = "SELECT MAX(user), email, COUNT(*) FROM my_table GROUP BY user ;"; if($result = $db->sql_query($sql_records)) { // fetch associative array
      while($row = $db->sql_fetchrow($result))
      {
             [INSERT CODE HERE, I want to display the 'user' and 'count']
      }
      $db->sql_freeresult($result);
} Thanks for any help! J

« previous php.db (#42330) next »