title: PHP & MySQL TRUNCATE TABLE returns false with AMFPHP
body: <p>I have looked at other topics, and I can't figure out whats wrong here. If I replace the TRUNCATE query with a simple SELECT * for example, I do get results. But this returns false. I copied the following code from this topic hoping to get a result: <a href="https://stackoverflow.com/questions/4702708/php-mysql-truncate-multiple-tables">PHP &amp; MySQL: Truncate multiple tables</a></p>
  
  <p>And I am doing this through AMFPHP.</p>
  
  <pre><code># the host used to access DB
  define('DB_HOST', 'localhost');
  
  # the username used to access DB
  define('DB_USER', 'usr');
  
  # the password for the username
  define('DB_PASS', '***');
  
  # the name of your databse
  define('DB_NAME', 'name');
  
  //$connection = new __database(DB_HOST,DB_USER,DB_PASS,DB_NAME);
  
  
  $connection = new mysqli(DB_HOST,DB_USER,DB_PASS,DB_NAME);
  
  if (mysqli_connect_errno())
  {
      printf("Connect failed: %s\n", mysqli_connect_error());
      exit();
  }
  
  $query = "TRUNCATE TABLE `books`";
  
  $result = $connection-&gt;query($query);
  if($result)
  {
      return $result;
  }
  else
  {
      return false;
  }
  </code></pre>