PHP PDO bindValue does not update the DB : <p>Could someone tell me what I am doing wrong.</p>

<p>If I use the code below, I am able to update the DB.</p>

<pre><code>            $sUpdateSql = "UPDATE googleAnalytics SET $period = '$value' WHERE statisticName = '$item' ";
            $preparedStatement = $db-&gt;query($sUpdateSql);
</code></pre>

<p>However, with the statement below the DB does not update.</p>

<pre><code>            $sUpdateSql = "UPDATE googleAnalytics SET $period = '?' WHERE statisticName = '?' ";
            $preparedStatement = $db-&gt;prepare($sUpdateSql);
            /* bind parameters for markers */
            $preparedStatement-&gt;bindValue(1, $value);
            $preparedStatement-&gt;bindValue(2, $item);
            $preparedStatement-&gt;execute();
</code></pre>
