help with "ORDER BY" query
| From: | Jesús Alain Rodríguez Santos | Date: | Fri, 29 Jul 2005 15:00:14 +0000 |
| Subject: | help with "ORDER BY" query | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-219601@lists.php.net to get a copy of this message | ||
I have a query:
$query = mysql_query("SELECT event FROM table WHERE month = 'x' ORDER BY
day ASC");
I have all days of the month insert in day field: 1, 2, 3, 4, 5 ...
when I print the query:
if ($query_r = mysql_fetch_array($query)) {
do {
echo "<td
width='8%'>".$query_r['event']."</td>\n";
} while ($query_r = mysql_fetch_array($query));
echo "</tr> \n";
} else {
echo "No se encontraron registros";
}
It print all result of the query, less day 1
What it's the problem
--
Este mensaje ha sido analizado por MailScanner
en busca de virus y otros contenidos peligrosos,
y se considera que está limpio.