Re: Infinite Loop Issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





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\";
target=\"_blank\">".$a.'</a>';
          $i++;
        }
        $issues = implode(', ', $row2);

        echo $release_id;
        echo $description;
        echo $date;
        echo $issues;
        echo $priority;
        echo '<br />';
    }

    $all->close();
}


First of all check if the sql works using a client directly. Did you meant to query this:

date(release_date) AS date


instead of this:

date(release_date) date

??



Sorry I was lame enough to forget the backticks

date($test) AS `date`

--
Thodoris


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux