I am using below code to fetch records from database in Laravel
$products = new Product();
$products = $products->orderBy('id', 'DESC')->paginate(10);
But it's throwing exception
PDOException SQLSTATE[HY093]: Invalid parameter number
It's also showing below error:
Illuminate\Database\QueryException SQLSTATE[HY093]: Invalid parameter number (SQL: select count(*) as aggregate from 'tbl_products' where 'tbl_products'.'deleted_at' is null and 'category_id' = 10 and
created_at
between and ?)
I tried to find a solution which is already posted here but didn't work for me.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire