I am trying to alter the auto_increment by laravel stament function and it is giving the error.
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 bills
AUTO_INCREMENT=9)
if($quantity[$i]>$qtny)
{
Bills::where('id','=',$invoice_no)->delete();
DB::enableQueryLog();
DB::statement('alter table `bills` AUTO_INCREMENT=?',array('invoice_no'=>$invoice_no));
dd(DB::getQueryLog());
//return "<script>alert('Quantity is not available for product ".$item_name[$i]."');location.href='/create';</script>";
}