如何使用 MySQL 将这些组合成一个语句?
SELECT COUNT(barcode) AS count
FROM movieitemdetails_custom
WHERE username = 'John';
if count is == 0
SELECT title FROM movieitemdetails WHERE barcode = '12345';
else
SELECT title FROM movieitemdetails_custom WHERE username = 'John';
end-if