I’m checking if a column value is blank because I need to add 1 to it. This is actually a follow up of my question here
I’m doing
INSERT INTO posts (post_user_id, gen_id) SELECT 1, IFNULL((MAX(gen_id)+1 FROM
posts),0);
What’s wrong here?
I keep getting some kind of error.
try substituting it with
COALESCEor
IFNULL