Re: mysql_fetch_assoc and extract

From: Date: Mon, 14 Apr 2003 17:32:05 +0000
Subject: Re: mysql_fetch_assoc and extract
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-143816@lists.php.net to get a copy of this message
Sounds like you have a problem in the overall logic. If a row is not returned, then you shouldn't be doing any processing or calling extract, right? How are you retrieving the row? I don't understand why people use extract() as it is, anyhow... So what if you have to type $row['name'] instead of just $name? It makes your code easier for others to follow and doesn't waste memory by making all of the extra variables... ---John Holmes...
How much less memory does an array with say 10 elements take up compared with 10 variables? Is it 1/10th? Or is it the same? Currently I do error checking to see if the row returned anything, I'm just saying it would be convenient if you didn't have to go to the trouble.

« previous php.general (#143816) next »