  dk1983
join:2003-10-18 Boise, ID clubs:
·Qwest.net
| Mysql Descending / Ascending order
Guys can someone help me out with my select statement?
That is what I have now but I cant seem to order it by speed, what gives?
data:
|
|
  PetePuma How many lumps do you want Premium,MVM join:2002-06-13 Arlington, VA
| the "desc" after the group by seems... wrong.
You generally need both a group by and an order by.
If you add
to the end of your query, does it work? |
|
  dk1983
join:2003-10-18 Boise, ID clubs:
·Qwest.net
| reply to dk1983 WOW well Ill be!!! 
You can use numbers for the column to sort by?? The things you learn just by asking 
Thank you Pete |
|
  dk1983
join:2003-10-18 Boise, ID clubs:
·Qwest.net
| reply to dk1983 Guys I have another question, is it possible to run a query based on the results of another query?
For example I do a
Then search withing those results? |
|
  jayco437 Premium join:2001-08-11 El Paso, TX | It's possible, try reading up on subselects. |
|
 Graycode
join:2006-04-17
·net2phone
| reply to dk1983 said by dk1983 :... is it possible to run a query based on the results of another query? Subselects and also a FROM clause may be a select too. Some examples of that are in: »[SQL] How to Count() when there's no distinct column |
|
  GILXA1226 Premium,MVM join:2000-12-29 London, OH clubs:
| reply to dk1983 said by dk1983 :WOW well Ill be!!!  You can use numbers for the column to sort by?? The things you learn just by asking  Thank you Pete Yes, you can use numbers, however it's always better to use the actual column names. One good reason is, it makes the query easier to read, the other good reason is that is lessens the chance of the query breaking if in a week, month, year, you add another column into the select statement that changes what the number(s) is/are of the column(s) you were sorting by.
just my $0.02. |
|
  PetePuma How many lumps do you want Premium,MVM join:2002-06-13 Arlington, VA
| said by GILXA1226 :Yes, you can use numbers, however it's always better to use the actual column names. One good reason is, it makes the query easier to read, the other good reason is that is lessens the chance of the query breaking if in a week, month, year, you add another column into the select statement that changes what the number(s) is/are of the column(s) you were sorting by. just my $0.02. Agreed. Generally, I avoid the numeric syntax except with odd computed columns. |
|
  GILXA1226 Premium,MVM join:2000-12-29 London, OH clubs:
| said by PetePuma :Agreed. Generally, I avoid the numeric syntax except with odd computed columns. You really shouldn't have to do it then, unless whatever database you are using doesn't support column aliasing. |
|