Jump to content


help with mysql_free_result(int result);

  • Please log in to reply
2 replies to this topic

#1 cjkent17

  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 29 October 2003 - 03:15 AM

I was wondering if the mysql_free_result(int result); function can be used with a wildcard (ie, so it free\'s all results without you having to type each of the names in)?

#2 pauper_i

  • Members
  • PipPipPip
  • Advanced Member
  • 59 posts
  • LocationPhoenix, AZ, USA

Posted 29 October 2003 - 08:49 AM

phpfreaks.com Example
Submitted by phpfreak - May 21, 2002
$sql = mysql_query(\"SELECT item1, item2 FROM yourtable order by item1\") or die (mysql_error());

while(list($item1, $item2)=mysql_fetch_array($sql)){
echo \"$item1 and $item2\";



How many concurrent queries are you running?
Genius is one percent inspiration, and ninety-nine percent perspiration. [br]Thomas Alva Edison

#3 cjkent17

  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 29 October 2003 - 10:03 AM

i know how to use it, i just made a whole site without realizing i needed to release all the results, which means i gotta go through every single page, find every single query (and there is a lot of them, over 40 pages) that is stored in a variable array and free them after they have finished being useful.

i basically just want to know if there is any way to go to the end of each page and just type for example (don\'t try this, it doesn\'t work) mysql_free_result(*); and that way it would free all of them at once.

i just mainly want to know if i can save myself a lot of time and patience doing it an easy way rather than find out after i did it all :D

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users