I have a table called Subject_table.. I'm trying to update a field in that table.... but i keep getting a syntax error.... Not sure wad i'm doing wrong. All fields in the table are of type VARCHAR(30)
This is what the queryString looks like
queryString2 = "update "+tablename+" set tittle='"+tittle+"' , desc='"+desc+"', creditPoints='"+creditPoints+"' where cid='"+cid+"'";
Actual query
UPDATE subject_table
SET tittle='Subject 1', desc='Subject 1', creditPoints='5'
WHERE cid='CSE11111';
I also have delete query which works fine...
Would appreciate the help..!!! The table
DROP TABLE IF EXISTS `dummy`.`subject_table`;
CREATE TABLE `dummy`.`subject_table` (
`cid` varchar(15) NOT NULL DEFAULT '',
`tittle` varchar(45) NOT NULL DEFAULT '',
`desc` varchar(550) NOT NULL DEFAULT '',
`creditPoints` varchar(45) NOT NULL DEFAULT '',
PRIMARY KEY (`cid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;