PDO "ON DUPLICATE KEY UPDATE" prepared statement
<p>I am attempting a prepared statement for the first time based on <a href="https://stackoverflow.com/questions/11390093/how-can-i-use-on-duplicate-key-update-in-pdo-with-mysql">this thread</a>. So far I am getting the error message <code>SQLSTATE[HY000]: General error: 1 near "ON": syntax error</code> Here is the query followed by the <code>try</code> block: </p>

<pre><code>$query = "INSERT INTO results2015_2016 ('id','ata','atc','atcommon','atn','ats','atsog','hta','htc','htcommon','htn','hts','htsog','bs','bsc','canationalbroadcasts','gcl','gcl1','gs','r1','usnationalbroadcasts')
          VALUES (':id',':ata',':atc',':atcommon',':atn',':ats',':atsog',':hta',':htc',':htcommon',':htn',':hts',':htsog',':bs',':bsc',':canationalbroadcasts',':gcl',':gcl1',':gs',':r1',':usNationalBroadcasts')
          ON DUPLICATE KEY UPDATE id= ':id2'";
try {   
    $db = new PDO('db info');  
    $db-&gt;setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);  
    $stmt = $db-&gt;prepare($query);
    $stmt-&gt;bindParam(':ata', $ata, PDO::PARAM_STR);
    $stmt-&gt;bindParam(':atc' , $atc , PDO::PARAM_STR);
    $stmt-&gt;bindParam(':atcommon', $atCommon , PDO::PARAM_STR);
    $stmt-&gt;bindParam(':atn', $atn , PDO::PARAM_STR);
    $stmt-&gt;bindParam(':ats', $ats , PDO::PARAM_INT);
    $stmt-&gt;bindParam(':atsog', $atsog , PDO::PARAM_INT);
    $stmt-&gt;bindParam(':hta', $hta , PDO::PARAM_STR);
    $stmt-&gt;bindParam(':htc', $htc , PDO::PARAM_STR);
    $stmt-&gt;bindParam(':htcommon', $htCommon , PDO::PARAM_STR);
    $stmt-&gt;bindParam(':htn', $htn , PDO::PARAM_STR);
    $stmt-&gt;bindParam(':hts', $hts , PDO::PARAM_INT);
    $stmt-&gt;bindParam(':htsog', $htsog , PDO::PARAM_INT);
    $stmt-&gt;bindParam(':bs', $bs , PDO::PARAM_STR);
    $stmt-&gt;bindParam(':bsc', $bsc , PDO::PARAM_STR);
    $stmt-&gt;bindParam(':canationalbroadcasts', $caNationalBroadcasts , PDO::PARAM_STR);
    $stmt-&gt;bindParam(':gcl', $glc , PDO::PARAM_BOOL);
    $stmt-&gt;bindParam(':gcl1', $glc1 , PDO::PARAM_BOOL);
    $stmt-&gt;bindParam(':gs', $gs , PDO::PARAM_INT);      
    $stmt-&gt;bindParam(':r1', $r1 , PDO::PARAM_BOOL);
    $stmt-&gt;bindParam(':usnationalbroadcasts', $usNationalBroadcasts , PDO::PARAM_STR);
    $stmt-&gt;bindParam(':id', $idGame , PDO::PARAM_INT);
    $stmt-&gt;bindParam(':id2', $idGame , PDO::PARAM_INT);
    $stmt-&gt;execute();
} catch (Exception $e) {  
        echo $e-&gt;getMessage();
        exit;
    }   
</code></pre>

<p>I can't seem to find much on this error message and what it has to do with my situation. This code is within a loop parsing jsonp...I can post the entire code if needed.</p>