Ben MySQL ve PHP kullanıyorum. Ben bir tablo denilen madde var. Onun nitelikleri iki fiyat vardır ve indirimli price.i aşağıdaki SELECT deyimi var:
$sql =
'SELECT C.cart_id,I.item_id,C.quantity, I.discounted_price,I.price
FROM cart C, item I
WHERE I.item_id = C.item_id';
I want to modify this sql statement and include a conditional expression such that: if discounted_price is 0, it selects price else, discounted_price is selected. Can conditional expression be used in an SQL statement? Thanks! :)