Ahmed Alaa Eldeen Ahmed Alaa Eldeen - 1 year ago 51
MySQL Question

Getting Syntax Error for update query in mysql


> #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use
> near 'where `membership_num`='1'' at line 1


SET `member_id`= 2,
`duration`='3 شهور',
`member_ship_cost` =500,
`membership_type` ='Silver',
`amout_done` =500,
`amount_reminder` = 0,
`trainer_id` =
WHERE `membership_num`=1

Answer Source
trainer_id = where membership_num=1

You have to specify what trainer_id is. Right now you just have an = sign with nothing after so that is the syntax error.