empire-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Weidele <daniel.weid...@uni-konstanz.de>
Subject MySQL with Variables
Date Mon, 10 Aug 2015 20:44:56 GMT
Hi friends,

is anyone aware of how to correctly use something like

db.executeSQL("SET @a:=0; UPDATE EDGE SET id=@a:=@a+1 WHERE GRAPH_ID=?;",
new Object[] { graphId }, conn);

I only receive syntax errors from within JDBC, so this isn't necessarily an
EmpireDB issue - however, I wouldn't know what to tell JDBC either.

Submitting the statement (without parameter ?, but the actual value)
directly in the data base's admin GUI works perfectly (MySQL).

Do you have any ideas whether I need to escape/configure something?

Cheers & thanks,

*Daniel K.I. Weidele, **M.Sc. B.Sc.*
*PhD student*
*ERC Synergy-NEXUS 1492 <http://www.nexus1492.eu/>*
*Algorithmics Group*
*Department of Computer & Information Science*
*University of Konstanz*
*PO Box 67*
*78457 Konstanz*
*mobile. +49 (0)174 7275725*
*office. +49 (0)7531 88-4571*

View raw message