php - MySQL 5.1 Order by query not working -
i trying run order query, , cannot seem figure out problem is. can tell, should work. no errors whatsoever order of table not change.
the table has 6 columns of type char , unsigned auto_incrementing id. last_name column in query of type char(25).
$query="select * employees order last_name"; $result = mysql_query($query);
"but order of table not change"
how getting results out of $result populate table? if output results using print_r in expected order?
while ($row = mysql_fetch_assoc($result)) echo $row['last_name'] . "\n";
Comments
Post a Comment