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>
for firephone adb connection you need amazon fire phone sdk provided by Amazon. Inside that sdk you find device driver for firephone then you can connect your fire phone to the system rest thing are same you need to go settings then enable developer option there.