UPDATE Error SqLite and PHP

0
<?php

   $ip = $_REQUEST['ip'];
   $port = $_REQUEST['port'];

   class MyDB extends SQLite3 {
      function __construct() {
         $this->open('Tracker.db');
      }
   }

   $db = new MyDB();
   if(!$db) {
      echo $db->lastErrorMsg();
   } else {
      echo "Opened \n";
   }
   $sql =<<<EOF
      UPDATE Server SET ip, port VALUES('$ip', '$port') WHERE ip='$ip';
EOF;
   $ret = $db->exec($sql);
   if(!$ret) {
      echo $db->lastErrorMsg();
   } else {
      echo $db->changes(), " Record updated successfully\n";
   }

   $db->close();
?>

The above code takes the values Ip and Port coming via GET and does the UPDATE in the database, in the same database I can remove and insert data ...

The error returned by it is: near ",": syntax error

    
asked by anonymous 08.07.2018 / 23:09

0 answers