Issue with DAS 3.1.0 and gadget from SQL query

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Issue with DAS 3.1.0 and gadget from SQL query

Jorge Infante
Hi all.

I just created a gadget with this query:
SELECT Location AS pais, COUNT(Location) AS cantidad FROM twxcountryv2 GROUP BY(pais) ORDER BY cantidad DESC LIMIT 10

issue #1: with LIMIT in the query the gadget does´nt work. In DAS console I can see this error: 
WARN {org.jaggeryjs.hostobjects.db.DatabaseHostObject} -  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 'limit 1' at line 1 {org.jaggeryjs.hostobjects.db.DatabaseHostObject}


issue #2: after modified the rdbms-provider-api.js,  I changed this line:
var selectQueryResult = getData(providerConfig, 1);
by this one:
var selectQueryResult = getData(providerConfig);

The gadget is working now  but with Y column in the wrong order and not starting in 0 value.

Any idea about this issues??


Regards, 
                 Jorge.

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev