-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Description
I am having some issues with multiple statements. I am trying to insert a row then select from the same database but I am being told that there is an error in my second statement but there is not. They work when entered in via phpmyadmin interface but fail when used in node. I have tried dumming the multiple select down to its most basic level (the example given in the readme in fact) but am still seeing the same error.
var mysql = require('mysql');
var connection = mysql.createConnection(properties);
connection.query('SELECT 1; SELECT 2;', function(){
console.log(arguments);
});
=> { '0':
{ [Error: ER_PARSE_ERROR: 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 2' at line 1]
code: 'ER_PARSE_ERROR',
errno: 1064,
sqlState: '42000',
index: 0 },
'1': undefined,
'2': undefined }
Any pointers/reasons for this?
Thanks
Joe