So, I'm trying to use the query when choosing productswhich is at the Critical level . Thus, if a product is quantitybelow it reorder_point, it will be considered critical .
Here is mine query, which I use:
$products = DB::table('inventory')
->where('quantity', '<=', 'reorder_point')
->orderBy('quantity', 'asc')
->get();
But it is displayed only after quantitythis line is set to 0or less. Therefore, I believe that the value is re_orderpointin the where clause 0.
But everything works when I use this query in phpMyAdmin:
SELECT * from inventory where quantity <= reorder_point
source
share