if statement - If exists in mysql not working -
if exists (select * pages pages.id = 21) update `pages` set `content`='updated' (`id`='21') else insert `pages` (`subject_id`) values ('102')
not working problem
try this
insert `pages` (`subject_id`) values ('102') on duplicate key update `content`='updated' `id`='21'
Comments
Post a Comment