无法从mysql数据库中获取英语和希腊语中的短语

I have a mysql database and I have a table called "user_job". In row "category" I have stored a phrase which is "Alpha - Αλφα". My code is :

<?php
 $e = mysql_query("select `category` from `user_job` where `category`='$category' ");

 $a = mysql_num_rows($e); 

?>

It returns me 0 rows when I run it. If I remove "Αλφα" this greek word in greek character it works and returns me 1 row. What is the problem here and how to fix it. My table is set to "utf8_general_ci"

This seems like an encoding mismatch, what you should do is to make sure that you convert to the proper encoding with that of your database.

The greek alphabet is usually encoded as ISO-8859-7. If this is indeed the case for your input, then you can convert it like so:

<?php
$category = iconv('ISO-8859-7', 'UTF-8', $category);
?>

PHP provides many useful functions to convert between encodings:

Both which comes with the default PHP distro.