Unexpected field in Mysql fetch data-Collection of common programming errors
I have a query in which the data is lifted from the database. Eg: I have Category as a field which has values like Doctors, Pathologists etc which is taken from the database.
Category
--------
Doctors
Pathologists
Pediatrics/Child Specialist --->> Unwanted data
The problem is there is a data(value) in ‘Category’ field which is unexpectedly showing in the list which is not in my database. I even tried to drop the table entirely and reload it but that field is still showing.
Can anyone tell me why is this happening?
Additional Info
function getTierCategory()
{
echo "
";
$result = mysql_query("SELECT DISTINCT Category FROM doctors order by Category asc")
or die(mysql_error());
while($tier = mysql_fetch_array( $result ))
{
echo ''.$tier['Category'].'';
}
}
I have tried renaming the field but how can I if this value is not even in my database.
My Database looks like
Category | Qualification | State | District
--------------------------------------------
and so on