title: How to fix Error: Query was empty with query?
body: <p>I am updating the data in database from php and Getting Up Error:Query was empty with query. I badly need help. Thanks in Advance</p>
  
  <pre><code>&lt;?php
  $dbhost = 'localhost';
  $dbuser = 'root';
  $myDBname = 'jsv';
  $conn = mysql_connect("localhost", "root");
  mysql_select_db('jsv');
  if(isset($_POST['update']))
  {
  $nam = $_POST['namnid'];
  $mandag = $_POST['mandagid'];
  $tisdag = $_POST['tisdagid'];
  $torsdag = $_POST['torsdagid'];
  $fredag = $_POST['fredagid'];
  
  $sql = mysql_query("INSERT INTO jsv(CA_ID,Name,Address,Amount)  VALUES ('$mandag', '$tisdag', '$torsdag', '$fredag') WHERE Setup_Box_No = '$nam'", $conn);
  if(!$sql )
  {
    die('Could not update data: ' . mysql_error());
  }
  echo "Updated data successfully\n";
  
  }
  
  mysql_close($conn);
  ?&gt;
  </code></pre>