All pastes #547428 Raw Edit

Someone

public php v1 · immutable
·published 2007-06-07 11:46 UTC
rendered paste body
<?php$db = mysql_connect('localhost', 'bfplayers', 'bfplayers') or die(mysql_error());mysql_select_db('bfplayers', $db);$res = mysql_query('       SELECT DISTINCT a.alias_string,              MIN(s.time_first) AS time_first,              MAX(IF(s.time_last IS NULL, sv.last_update, s.time_last)) AS time_last       FROM   aliases AS a, guids AS g, sessions AS s, servers AS sv       WHERE  s.alias_key=a.alias_key              AND s.guid_key=g.guid_key              AND s.server_key=sv.server_key              AND g.guid_string="62fde01ce33c80158d228bb2fe73f25e"       GROUP BY alias_string       ORDER BY time_first ASC', $db) or die(mysql_error());while ($row = mysql_fetch_assoc($res)) {	print "${row['alias_string']} from ${row['time_first']} to ${row['time_last']}<br>\n";}mysql_close($db);?>