> -----Original Message-----
> From: Sandeep Hundal [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 14, 2001 3:21 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] my query results won't clear!! :(
> 
> 
> i'm running a select query on a table, and ihave a form right 
> underneath it, with similar names to the information selected
> in the query above.
> 
> yet despite using mysql_free_results before my form starts, it
> still keeps the last result of the query 1 in memory :(
> 
> are there any solutions??

It's hard to be certain of much without seeing any of your code.

My guess, though, would be that you're simply misunderstanding the
extent to which mysql_free_result() operates.

In particular, it only frees the memory associated with the result set
itself.  It does not clear out variables that you've assigned to hold
pieces of the returned data.

That is, given the following code:

        $result = mysql_query('select * from table');
        $mydata = mysql_fetch_array($mydata);
        mysql_free_result($result);

$result should be cleared out.  $mydata, however, should be retained.

Does that match what you're experiencing?


---
Mark Roedel ([EMAIL PROTECTED])  ||  "There cannot be a crisis next week.
Systems Programmer / WebMaster  ||   My schedule is already full."
     LeTourneau University      ||                    -- Henry Kissinger


--
PHP General 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]

Reply via email to