twobyfour
06-24-2010, 02:37 AM
I need to sort a select query.
Table is as follows:
license |
free |
commercial |
free |
gpl |
free |
gpl |
commercial |
I need this to order by all rows with free in the license column first and then gpl and then commercial.
How can i do select statement and use order by license and the entry to sort it like this:
free
free
free
gpl
gpl
commercial
commercial
SELECT * FROM ------- order by license and input";
$result = @mysql_query($sql,$connection) or die(mysql_error());
Table is as follows:
license |
free |
commercial |
free |
gpl |
free |
gpl |
commercial |
I need this to order by all rows with free in the license column first and then gpl and then commercial.
How can i do select statement and use order by license and the entry to sort it like this:
free
free
free
gpl
gpl
commercial
commercial
SELECT * FROM ------- order by license and input";
$result = @mysql_query($sql,$connection) or die(mysql_error());