<?php
require_once("include/config.inc.php");
mysql_select_db("player");
$result = mysql_query("SELECT * FROM player WHERE name LIKE '[SGM]%' AND DATE_SUB(NOW(), INTERVAL 5 MINUTE) < last_play;");
while ($row = mysql_fetch_object($result)) {
    echo "$row->name <br>";
}
mysql_free_result($result);    
?> 