gsr
10/02/2022, 3:16 PMcom.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 'select concat(''<a href=index.html?action=newreg&id='',id,''>'') as id ,`name`,a' at line 1 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.mysql.jdbc.Util.handleNewInstance(Util.java:389) at com.mysql.jdbc.Util.getInstance(Util.java:372) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:980) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3835)
Adam Cameron
concat
expression is supposed to be along the lines of concat('<a href=index.html?action=newreg&id=',id,'>')
? You did see that, right?
It's impossible to guess what yer doing wrong in yer code cos. like, you ain't shown it to us. Yer - once again - relying on us to guess.gsr
10/02/2022, 8:27 PMgsr
10/02/2022, 8:27 PMAdam Cameron
gavinbaumanis
10/02/2022, 11:00 PMvar theSqlToRun = "SELECT .... ";
writeLog(type="Information", file="myFaultySQL", text="the SQL I am trying to run is : #theSqlToRun#");
myQuery = new Query(datasource="theDS", name = "myQuery", sql=theSqlToRun);
// if needed
// myQuery.addParam(...);
qryResult = myQuery.execute().getResult();
gsr
10/02/2022, 11:04 PMgsr
10/02/2022, 11:13 PMgavinbaumanis
10/02/2022, 11:25 PMMichael Schmidt
10/03/2022, 12:57 AMAdam Cameron