i have a table where one of the columns is a list of names and the other columns are data for that list of names.
ex:
name date purchase
Dave 080900 10.32
Aaron 080300 12.00
Dave 072900 73.75
Jim 072800 42.85
Mike 072500 32.99
Dave 072300 129.00
what i want to do is display the whole list of purchases and sort them by a specific name first and then the rest of listings in any order following that. so it would be easy for Aaron cause then i do "select * from table order by name asc" and Mike also would be easy since it is the same but i would just change asc to desc. the problem i am having is i know how to select only the records w/ name $x or all of the records withOUT name $x, but i dont know how to select name $x and THEN all the other records that dont contain name $x in the same select.
does anyone know a single sql statement that would work for this? i am using mysql. if anyone knows a good site for mysql references, that would be a great help also.
thanks in advance for any light you can shed on this problem.
Aaron
ex:
name date purchase
Dave 080900 10.32
Aaron 080300 12.00
Dave 072900 73.75
Jim 072800 42.85
Mike 072500 32.99
Dave 072300 129.00
what i want to do is display the whole list of purchases and sort them by a specific name first and then the rest of listings in any order following that. so it would be easy for Aaron cause then i do "select * from table order by name asc" and Mike also would be easy since it is the same but i would just change asc to desc. the problem i am having is i know how to select only the records w/ name $x or all of the records withOUT name $x, but i dont know how to select name $x and THEN all the other records that dont contain name $x in the same select.
does anyone know a single sql statement that would work for this? i am using mysql. if anyone knows a good site for mysql references, that would be a great help also.
thanks in advance for any light you can shed on this problem.
Aaron