As stated in the comments, I don't think you can work with data directly and evaluate it to the alphabet as you are wishing (of course you can still assign results to variables).
If you must have A-Z for whatever reason, I think the best solution would be to use a PHP script to parse the results of the query. If this is the case, you won't really need the Employee ID number, as you can work with the occurrence of the results, but I left the ID number in there anyways.
<?php
// DB connection info
include("mysql_connection.php");
$query = mysql_query("SELECT EmployeeID, EmployeeName FROM Employees WHERE EmployeeID >= 1234");
$results = mysql_fetch_array($query);
$iteration = "A";
echo "ID - Name";
while(list($empNumber,$empName) = $results)){
echo $iteration." - ".$empName;
++$iteration;
}
?>
Note: mysql_query
was used for the example, generally you should use MySQLi
or PDO
.
Note 2: The use of $iteration
in this will automatically increment the letter output, when it reaches Z, it should go onto AA
.