Hello,
i could not find information about extracting data by using
*sql_query (for me mssql_query) and do that in a way that saves server
memory.
I usually use:
$sql = "exec sp_get_GremiumsMitglieder
@foo = 'myFoo',
@bar = 42";
$rsResult = mssql_query($sql);
$i=0;
while($data = mssql_fetch_array($rsResult))
{
extract($data);
$mitglieder[$i] = array("id" => $id, "displayName" => $displayName,
"eMail" => $eMail, "authuser" =>
$authuser);
$i+=1;
}
So the result is an array half the size; instead of $mitglieder[0] and
$mitglieder[id] there is just $mitglieder[id].
Is there a better way. How can i free memory for Variables that are no
longer used (sql, rsResult, i). I sometimes read something about die()
/ exit() but the online documentation on php.net did not say anything
that would led to belive that memory is freed.
Is there a necessity / advantage to close the connection to
sql-server?
Thanks a lot
Tom Asken