結果が空なので、このphpコードをテストします:
if (isset ($_GET ["name"])){
$name = mysql_real_escape_string($_GET ["name"]);
$query = htmlentities ($query);
mysql_query("SET NAMES 'utf8'");
$query = mysql_query("SELECT * FROM my_table WHERE name = '$name');
$result = mysql_query($query);
$rows = array();
if (!empty($result)){
while($r = mysql_fetch_assoc($result)){
// $rows[] = $r; has the same effect, without the superfluous data attribute
$r["Column1"] = $r["Column1"];
$r["Column2"] = $r["Column2"]; //You can add many columns like the table have
$rows[] = $r;
//$rows[] = array('Deal' => $r);
}
echo json_encode($rows);
}
}