How do I order the results of my query?
So if you have a list of first names, you will often want to order them alphabetically and not in the jumbled format that they come out of the database. So here's how to do it:
<?php
$atozofnames = mysql_query("SELECT firstname FROM names ORDER BY firstname");
?>
Comment on this Question and Answer >>>
ASK A QUESTION
More mysql PHP Questions
How do I connect to mySQL from PHP?How do I group the results of a mysql query?
how can I show an image from mysql?
how do i upload an image to database?
How do I access the current time with mysql?
