title: Syntax error or access violation: 1064 You have an error in your SQL syntax in alter table
body: <p>I am trying to alter the auto_increment by laravel stament function and it is giving the error.</p>
  
  <p>The complete error message displaying is SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '?' at line 1 (SQL: alter table <code>bills</code> AUTO_INCREMENT=9)</p>
  
  <pre><code>if($quantity[$i]&gt;$qtny)
  {
      Bills::where('id','=',$invoice_no)-&gt;delete();
      DB::enableQueryLog();
          DB::statement('alter table `bills` AUTO_INCREMENT=?',array('invoice_no'=&gt;$invoice_no));
      dd(DB::getQueryLog());
      //return "&lt;script&gt;alert('Quantity is not available for product ".$item_name[$i]."');location.href='/create';&lt;/script&gt;";
  }
  </code></pre>