MySQL を使用してこれらを 1 つのステートメントに結合するにはどうすればよいですか?
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