从mysql表中回显单个值

I've been driving myself mad with this for the last hour. It should be so easy but I just cannot work it out:

All I am trying to do is echo 1 value (in column "active") from a mysql table where the column "name" is equal to "GSHP".

This is what I have. Can anyone please help?

$query = "SELECT active FROM discount WHERE name = GSHP";

        $result = mysql_query($query);

        $row = mysql_fetch_array($result);

        echo $row['active'];

In SQL you need to fit string literals into quotes. Your query should look like:

$query = "SELECT active FROM discount WHERE name = 'GSHP'";