title: syntax error unexpected 'FROM' (T_STRING)
body: <p>I am a  beginner in PHP and MySQL and don't know what's wrong. It says error on line 8: </p>
  
  <pre><code>syntax error unexpected 'FROM' (T_STRING)
  </code></pre>
  
  <p>Here is the code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?php
  require "conn.php";
  
  $category = $_POST["category"];
  $fruit = $_POST["fruit"];
  $cost = $_POST["cost"];
  
  DELETE FROM `Temptable` WHERE image_path = "";
  UPDATE Temptable SET (`category`, `fruit`, `cost`) VALUES ('$category','$fruit','$cost');
  $mysql_qry = "INSERT INTO Datatable (`category`, `fruit`, `cost`) SELECT `categrory`, `fruit`, `cost` FROM `Temptable` WHERE `id` &gt;= '1'";
  
  if($Datatable-&gt;query($mysql_qry) === true) {
   echo "Successful";
  }
  else {
   echo "Error: " . $mysql_qry . "&lt;br&gt;" . $Datatable-&gt;error;
  }
  $Datatable-&gt;close();
  $Temptable-&gt;close();
  ?&gt;</code></pre>
  </div>
  </div>
  </p>