Re: MySQL Query Result Question

From: Date: Fri, 28 Feb 2003 23:50:41 +0000
Subject: Re: MySQL Query Result Question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-137650@lists.php.net to get a copy of this message
At 00:20 01.03.2003, Van Andel, Robbert said: --------------------[snip]-------------------- >I have the following query: >$query = "SELECT d.utilization, d.capacity_date, d.day, i.id, i.interface, >cd.date, cd.id "; > $query .= "FROM (capacity_data as d LEFT JOIN interfaces as i ON >d.interface = i.id) "; > $query .= "LEFT JOIN capacity_date as cd ON d.capacity_date=cd.id "; > $query .= "WHERE i.router = '$cmts[$i]' AND cd.date >= '$useDate' > "; > $query .= "ORDER BY i.interface,cd.date DESC"; > >if(!$result = mysql_query($query)) die(mysql_error()); > >while($data=mysql_fetch_array($query) >{ > //SSLT >} --------------------[snip]-------------------- Simply setting $result=null after the loop should do, or am I off topic? if(!$result = mysql_query($query)) die(mysql_error()); while($data=mysql_fetch_array($result)) { //SSLT } $result = null; // could also use // unset($result); -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/

« previous php.general (#137650) next »