RE: [PHP-DB] MYSQL/PHP what is the difference between unset() and mysql_free_result() ?
nope. see my previous reply -Original Message- From: Bas Jobsen [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 06, 2001 10:11 AM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] MYSQL/PHP what is the difference between unset() and mysql_free_result() ? > And how can i free the data-space from a string or somting like that? > b.e. > $string="a very long string"; > free($string);#? > #could i use mysql_free_result($string); Maybe I can use: unset($string=""); or unset($array=array()); to free the data-space also -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] MYSQL/PHP what is the difference between unset() and mysql_free_result() ?
> And how can i free the data-space from a string or somting like that? > b.e. > $string="a very long string"; > free($string);#? > #could i use mysql_free_result($string); Maybe I can use: unset($string=""); or unset($array=array()); to free the data-space also -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] MYSQL/PHP what is the difference between unset() and mysql_free_result() ?
You free-up the dataspace pointed-to by $string with unset(). PHP knows that this variable points-to character data or numeric or whatever. unset() then releases the dataspace held by the $string itself and erases its name from the symbol table. Using mysql_free_result($string) will not work because $string does not point-to a result returned from a mysql_query(). After executing mysql_free_result($result), $result still exists in the symbol table. You would have to unset($result) to delete the pointer itself. -Original Message- From: Bas Jobsen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 05, 2001 4:46 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] MYSQL/PHP what is the difference between unset() and mysql_free_result() ? Hello, > unset() simply deletes the pointer to the data without releasing the space > held by the data. > mysql_free_result() releases the data storage pointed-to by the $result > pointer. > This is important because $result could be pointing-to a dataspace > containing a large number or rows returned by the mysql_query(). You WANT > to recover this dataspace. Well, oke, tnx. But if unset() doesn't releas the data-space, what then is it's functionality? only voor tests like: if(isset($var)) ;? And how can i free the data-space from a string or somting like that? b.e. $string="a very long string"; free($string);#? #could i use mysql_free_result($string); Tnx, Bas -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] MYSQL/PHP what is the difference between unset() and mysql_free_result() ?
Hello, > unset() simply deletes the pointer to the data without releasing the space > held by the data. > mysql_free_result() releases the data storage pointed-to by the $result > pointer. > This is important because $result could be pointing-to a dataspace > containing a large number or rows returned by the mysql_query(). You WANT > to recover this dataspace. Well, oke, tnx. But if unset() doesn't releas the data-space, what then is it's functionality? only voor tests like: if(isset($var)) ;? And how can i free the data-space from a string or somting like that? b.e. $string="a very long string"; free($string);#? #could i use mysql_free_result($string); Tnx, Bas -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] MYSQL/PHP what is the difference between unset() and mysql_free_result() ?
unset() simply deletes the pointer to the data without releasing the space held by the data. mysql_free_result() releases the data storage pointed-to by the $result pointer. This is important because $result could be pointing-to a dataspace containing a large number or rows returned by the mysql_query(). You WANT to recover this dataspace. -Original Message- From: Bas Jobsen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 05, 2001 4:00 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] MYSQL/PHP what is the difference between unset() and mysql_free_result() ? Hello, Maybe someone can tell me, the difference b.e. $result = mysql_query ($query); unset($result); #or better mysql_free_result($result); tnx, Bas Jobsen -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]