Unable to use dynamic variable as column name in php mysql : <p>Am trying to use dynamic column name in php mysql update but am getting error
Here is code</p>

<pre><code> $time=date("H");
 $video_view = 234
 $update_query = "UPDATE videos SET ".  $time . "= {$video_view} WHERE id={$id}";
</code></pre>

<p>Here is the error</p>

<pre><code> UPDATE videos SET 14= 200079 WHERE id=1Query failedYou have an error in  
  your SQL syntax; check the manual that corresponds to your MariaDB  
 server version for the right syntax to use near '14= 200079 WHERE id=1' at line 1
</code></pre>
