
09-08-2012, 11:07 PM
|
|
|
Join Date: Apr 2004
Location: FL, USA
Posts: 215
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Originally Posted by kh99
You want to do something like:
Code:
$query = $db->query_read("SELECT value, varname FROM ".TABLE_PREFIX."setting WHERE varname IN ('illegalusernames','minuserlength ','maxuserlength')");
while ($results = $db->fetch_array($query))
{
print_r($results);
}
You should think about it as if the "query" call initializes things, and the fetch_array() actually gets the data. If you had a large database and a query that returned thousands of rows, it might not all fit in memory at the same time so the function couldn't return an array. Instead it's set up this way so that you don't have to concern yourself with those kinds of issues.
Edit: Oops, just noticed that Lynne beat me to that first reply. Anyway, you also have an extra space in the 'minuserlength' string.
|
freaking genius. ty... i feel like a moran for not trying while.
|