Re: date_format yet again
| From: | Boclair | Date: | Mon, 26 Mar 2001 13:32:59 +0000 |
| Subject: | Re: date_format yet again | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-7812@lists.php.net to get a copy of this message | ||
It has been pointed out to me that there is an error. I had failed to
include the two date fields in the select. The actual scripting is.
The query
include ("inputs/connect.php");
|$plantavail = mysql_query("SELECT * date_format(online,'%d-%b-%Y') AS
logon,
date_format(offline,'%d-%b-%Y') ) AS logoff
FROM
boclair.members where status='heavy' order by type, size");
the while loop
while ($myrow = mysql_fetch_array($plantavail)) {
printf('<tr>
<td class=regno align=right>%s</td>
<td class=type align=center>%s</td>
<td><span class=size>%s<span></td>
<td><span class=drive>%s<span></td>
<td><span class=mfr>%s<span></td>
<td><span class=date>%s<span></td>
<td><span class=date>%s<span></td>
</tr>
', $myrow['regno'], $myrow['type'], $myrow['size'],
$myrow['drive'], $myrow['mfr'], $myrow['logon'],
$myrow['logoff']);
Sorry
Tim Morris