Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool=EXISTS(SELECT * FROM FRIDGE WHERE INGREDIENT='Pasta')
- val =(SELECT QUANTITY FROM FRIDGE WHERE INGREDIENT = '$name')
- if(val>0){
- UPDATE APP.FRIDGE SET QUANTITY=(val+7), WHERE NAME = 'Pasta';
- }
- else INSERT INTO FRIDGE VALUES($name, $quantity, $date, $place);
Advertisement
Add Comment
Please, Sign In to add comment