I tried to update boolean values in MySql database but i receive error :
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'add=0, edit=0, delete=0, view=1 where id=3' at line 1
Table : tempemp
DROP TABLE IF EXISTS `struts`.`tempemp`;
CREATE TABLE `struts`.`tempemp` (
`id` int(10) unsigned NOT NULL auto_increment,
`role` varchar(45) NOT NULL,
`add` tinyint(1) NOT NULL default '0',
`edit` tinyint(1) NOT NULL default '0',
`delete` tinyint(1) NOT NULL default '0',
`view` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
Syntax : "update tempemp set add=?,edit=?,delete=?,view=? where id=?";