Thread: Resolved When to free sql results?
View Single Post
Old 01-25-2013, 12:48 AM   PM User | #5
rgEffects
New Coder

 
Join Date: Aug 2012
Posts: 76
Thanks: 22
Thanked 0 Times in 0 Posts
rgEffects is an unknown quantity at this point
Ok, so release would go here:
PHP Code:
<?php 
            $parentid 
0// assuming that 0 is the main category. 
            
get_sub_cats2($parentid); 
            function 
get_sub_cats2($parentid) { 
             
            
$sql "SELECT * FROM endeavors WHERE eID = ".$parentid."";  
            
$run mysql_query($sql); 
             
            echo 
'<ul class="aqtree3clickable">'
                while (
$rec mysql_fetch_assoc($run)) {  
                echo 
'<li />'
                
'<input name="cBox2[]" type="checkbox" id="cBox2[]" value="'$rec['id'],'"><a href=""></aa href=""></a>SN '
                 
$rec['id'], ' - ',  $rec['eName'], ' / '$rec['EBS'] ;  
                
get_sub_cats2($rec['id']); 
                } 
                    
mysql_free_result($run); // end of loop??
            
echo '</ul>'
            }
        
?>
rgEffects is offline   Reply With Quote