For some odd reason the sql only fetches the illegalusernames field when I read the var_dump output.
Code:
$results = $db->query_first("SELECT value, varname FROM ".TABLE_PREFIX."setting WHERE varname IN ('illegalusernames','minuserlength ','maxuserlength')");
Also tried query_read, but it only outputs a mysql resource.