$ir = $db->query(sprintf('SELECT * FROM dd_games WHERE category=\'%u\' ORDER BY rand() LIMIT 0,'.$limitboxgames.'', $row['ID']));
$ir = $db->query(sprintf('SELECT * FROM dd_games WHERE category=\'%u\' ORDER BY name ASC LIMIT 0,'.$limitboxgames.'', $row['ID']));
$r = $db->query(sprintf('SELECT * FROM dd_games WHERE category=\'%u\' LIMIT '.$limits.','.$max.' ', $ID));
$r = $db->query(sprintf('SELECT * FROM dd_games WHERE category=\'%u\' ORDER BY name ASC LIMIT '.$limits.','.$max.' ', $ID));