String condition="INSERT INTO"+tableName+"VALUES"+"("+""+nu+"
,"+na+"
,"+mT+"
,"+p+")";
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 '1111.0)' at line 1
无论怎么改 在p这里一直有错~
你的引号好像有点问题 试试这样子
'"INSERT INTO'+tableName+'VALUES("'+nu+'","'+na+'","'+mT+'","'+p+'")'
Insert into 标准格式: insert into tablename(columnName1,columnName2,columnName3) values(value1,value2,value3),
你的语句拼写没有描述要插入数据的列名(columnName1,columnName2,columnName3),
你加上去就运行通了.