Below is how I'm grabbing the information currently.
Code: Select all
$result = mysql_query('SELECT x,y,z
FROM SampleTable
WHERE x BETWEEN 0 AND 10000
AND y='.$someusersubmittednumber);
if (mysql_num_rows($result)==0)
{ die('No records available.');
}
while (list($X,$Y,$Z) = mysql_get_row($result))
{ // process information
}Code: Select all
$result = mysql_query('SELECT x,y,z
FROM SampleTable
WHERE x BETWEEN 0 AND 10000
AND y='.$someusersubmittednumber);
if (mysql_num_rows($result)==0)
{ die('No records available.');
}
while ($row = mysql_fetch_assoc($result))
{ // process information
}I've seen conflicting data on this issue where some people say it's better to use one array to keep overhead down, other say to minimize the use of arrays.
I'm not certain how php allocates memory. Would it be better to use the same array over and over in statements like this rather than storing each in a seperate variable? Would it be faster? Less strain on the server with multiple users?
Any help is appreciated.