I have a rather simple query to work with my ajax app, but it gives the following error:

> 
> You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc, price FROM products WHERE id='asfasfasf1'' at line 1
> 
> 
> 

I'm stumbled by this as I simply can't see the syntax error anywhere:

```
echo json_encode($this->query("SELECT name, desc, price FROM products WHERE id='".$id."';"), JSON_FORCE_OBJECT);

```

query() is as follows:

```
function query($query){
        $link = mysql_connect($this->host, $this->username, $this->password);
        $connected = mysql_select_db($this->database, $link);
        if(!$connected){
            die("Error: selecting database.");
        }
        $q = mysql_query($query);
        if(!$q){
            return "Error: ".mysql_error();
        }
        $result = mysql_fetch_assoc($q);
        return $result;
    }

```

Naturally, this is inside an object, but that shouldn't have anything to do with it. All the fields are correct, database can be connected to since the query() is used multiple times with other code and works well. Please help.