RE: Now not selecting enough

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

 



Your echo needs to be in the while loop...
<>< Ryan

-----Original Message-----
From: Alex Francis [mailto:afrancis@camerondesign.co.uk]
Sent: Wednesday, December 18, 2002 10:00 AM
To: php-db@lists.php.net
Subject:  Now not selecting enough


I am using the following script which I have used with minor variations,
several times before without any trouble. I have 3 items in my database but
the script only returns 1. I can change which one by leaving off the order
by filter, but can't get all three. Where am I going wrong. (PHP and MySQL).
$SQL = 'SELECT id, DATE_FORMAT(meetingdate, "%D %M %Y")as mtgdate FROM
boardprevious order by meetingdate desc ';

// execute SQL statement
$ret = mysql_db_query($dbname,$SQL,$link);

if (!$ret) { echo( mysql_error()); }
else {

// retrieve values

while ($row = mysql_fetch_array($ret)) {
$meetingdate = $row[mtgdate];
$id = $row[id];
}
}
echo ("<h5><A HREF=\"minutes_detail.php?id=$id\">$meetingdate</A></h5>");




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


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



[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux