Re: Infinite Loop Issue

From: Date: Thu, 06 Nov 2008 21:34:09 +0000
Subject: Re: Infinite Loop Issue
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-283027@lists.php.net to get a copy of this message
On Thu, Nov 6, 2008 at 1:34 PM, Kyle Terry <kyle@kyleterry.com> wrote: > I believe I'm doing everything right here. It just seems like it doesn't > end. The browser just keeps trying to load the page forever... > > function displayAll(){ > global $db; > $sql = "SELECT release_id, description, date(release_date) date, issues, > priority FROM release_data"; > $all = $db->prepare($sql); > $all->execute(); > $all->bind_result($release_id, $description, $date, $issues, $priority); > > while($all->fetch()){ > > $i = 0; > $iss_link = explode(', ', $issues); > foreach($iss_link as $a){ > $row2[$i] = "<a > href=\"http://mantisus/view.php?id=$a\<http://mantisus/view.php?id=$a%5C> > " > target=\"_blank\">".$a.'</a>'; > $i++; > } > $issues = implode(', ', $row2); > > echo $release_id; > echo $description; > echo $date; > echo $issues; > echo $priority; > echo '<br />'; > } > > $all->close(); > } w/e $all is, im guessing $all->fetch() is never returning false (or a value which can be type juggled to a boolean false equiv). if youre code is getting beyond the while loop, then there could be something wrong w/ $all->close(); and if its getting passed that, then obviously, something else is wrong. -nathan

« previous php.general (#283027) next »