Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

else if mysql

select id, 
    (SELECT 
    IF(qty_1<='23',price,1)
    ELSEIF(('23'>qty_1 && qty_2<='23'),price_2,1)
    ELSEIF(('23'>qty_2 && qty_3<='23'),price_3,1)
    ELSEIF('23'>qty_3,price_4,1)
    END IF) as total 
 from product;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #mysql
ADD COMMENT
Topic
Name
8+1 =