rocknbil - 5:09 pm on Dec 23, 2011 (gmt 0)
The operative difference is this:
ORDER BY firstname DESC
In case you missed it, the desc (descending) does the "z"'s first. Use asc if you want it abc.... you can also order by lastname and first name
order by lastname asc, firstname asc
The backticks in mysql queries are recommended but not always needed. They allow you to use names with spaces, or names that may conflict with internal functions or reserved words. For example, date_timestamp() is a mysql function, if you have a field named date_timestamp your queries would likely fail, but using backticks would allow it.
Look at them like a "safety wrapper" for table and field names. Quotes are not for db/table/field references, they are for non-numeric values.
select * from `database_name`.`mytablename` where `database_name`.`mytablename`.`fieldname`='testme';
Whether to use them or not . . . for beginners, it gives you one more pair of string values to debug. The correct answer is probably yes, but they are not really needed in most cases.