Code:
$query = $db->query_read("SELECT value, varname FROM ".TABLE_PREFIX."setting WHERE varname IN ('minuserlength','maxuserlength','illegalusernames')");
I am trying to pull the values for all three of the above fields using one sql query. I have tried numerous variations of queries/fetches; sadly the results always result in a resource id or:
Code:
Array ( [value] => admin moderator op9 option9 option.9 forum vbulletin [varname] => illegalusernames )
Please help me understand why only this row is being placed in the array.


Straight from phpMyAdmin:
Click image for larger version

Name:	phpMyAdmin SQL Result.jpg
Views:	1
Size:	71.4 KB
ID:	3724621

- - - Updated - - -

[RESOLVED]
Code:
$query = $db->query_read("SELECT value, varname FROM ".TABLE_PREFIX."setting WHERE varname IN ('minuserlength','maxuserlength','illegalusernames')");
while ($results = $db->fetch_array($query)) {//do stuff}