Question: I build my query in PHP dynamically, and when I try to execute it, it fails. When I copy the query it generated and paste it into the mysql terminal and run it, it works fine. The error I get is "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 '>' at line 1" for the following query:

```
UPDATE events SET event = 'orgo lecture', start = '2014-07-24 16:00:00' WHERE userID = 1 AND eventID = 5

```

The following is the code used to generate the query dynamically:

```
$query = "UPDATE events SET ";
$query_list = array();
if ($set_event) {

    $query_list[] = "event = '{$event}'";

}
if ($set_start) {

    $query_list[] = "start = '{$start}'";

}
if ($set_end) {

    $query_list[] = "end = '{$end}'";

}
$query_list_size = count($query_list);
for ($i = 0; $i < $query_list_size - 1; $i++) {

    $query .= $query_list[$i];
    $query .= ", ";

}
$query .= $query_list[$query_list_size - 1];
$query .= " WHERE userID = {$userID} AND eventID = {$eventID}";
echo $query .= "<br />";
$query_result = mysqli_query($connection, $query) or die(mysqli_error($connection));

```

Answer: 
> 
> On the Fire phone, the developer options in Settings are hidden by
>  default. To show developer options, do the following:
> 
> 
> 1. Open the Settings interface.
> 2. Scroll to the Device section and expand the section.
> 3. Tap **Get info about your Fire**.
> 4. Now tap any item in the list repeatedly. You must tap the item at least seven times within five seconds.
> 5. A **Developer Options** button appears at the bottom of the screen. Click that button
> 6. Set the **Developer Options** slider to the **ON** position.
> 7. Select **USB Debugging**.
> 
> 
> 

<https://developer.amazon.com/public/solutions/devices/fire-phone/docs/connecting-your-device>
First , you don't need to install the Fire Phone SDK Add-on. I spent an hour on this.

Second [Christina](https://stackoverflow.com/users/2072811/christina)'s instructions are old and the Amazon doc is not up to date.

Here is "How To" on the last update for **Fire OS 4.6.3**

> 
> 1. Open the Settings app.
> 2. Scroll to the "About Your Fire" section and expand the section. Tap on phone number, serial number
> 
> 
> 

[![enter image description here](https://i.stack.imgur.com/e6QHg.png)](https://i.stack.imgur.com/e6QHg.png)

> 
> 3. Now tap repeatedly on **Model Number**.
> 4. A Developer Options button appears at the bottom of the screen.
>  Click that button
> 
> 
> 

[![enter image description here](https://i.stack.imgur.com/TKUTl.png)](https://i.stack.imgur.com/TKUTl.png)

> 
> 5. Set the Developer Options slider to the ON position. Check **USB
>  Debugging**.
> 
> 
>