<分区>
这是我的查询:
$sql = "
SELECT
items.item_id,
name,
category,
item_number,
cost_price,
unit_price,
item_quantities.quantity
FROM ospos_items
LEFT JOIN item_quantities ON items.item_id = item_quantities.item_id
WHERE
deleted='0' OR item_quantities.quantity>='0'
";
我的 table 是
Item table
Name | item_id | Cost price | Unit price |
shirt1 | 4 | 3800.00 | 5320.00
shirt2 | 5 | 3800.00 | 5320.00
shirt3 | 6 | 3800.00 | 5320.00
shirt5 | 7 | 2900.00 | 4060.00
数量表
item_id | Quantity
4 | 5
5 | 4
6 | 3
7 | 0
我不想显示数量为 0 的行。