Sql statement if exists statement execution error report is very inexplicable. I hope you can take a look at it.

sql judges if exists to report an error

when updating database data

ifiu= "if exists (select food_rank from config_battle where food_rank=" + cb.getFood_rank () + ")" + update+ "else" + insert;

update and insert are two separate sql statements, one is to modify and the other is to delete

Dec.15,2021

MySQL should be written as insert-on-duplicate. Reference document https://dev.mysql.com/doc/ref.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b34d1d-2bf4c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b34d1d-2bf4c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?