I'm wanting to fetch all the values of the "Category" column of a table called "Category', then sort them alpha while ignoring case. What I have doesn't sort them at all. Please help, I can't quite figure how how to apply other examples to this situation. I apologize if I didn't get the formatting right for stackoverflow.
//--The purpose of this is to populate a HTML select with the proper options
$MysqlUser = "brad";
$MysqlPass = "mysql";
$MysqlDatabase = "whispers";
$connection = mysql_connect("localhost","$MysqlUser","$MysqlPass");
if (!$connection){
die(mysql_errno() . mysql_error());
}
mysql_select_db("$MysqlDatabase", $connection);
$result = mysql_query( "SELECT Category FROM Category ");
while($row = mysql_fetch_assoc($result)){
asort($row);
foreach ( $row as $field ) {
print "<option value=\"$field\"> $field </option>";
}
}
mysql_close($connection);
//--End HTML select