List:MySQL++« Previous MessageNext Message »
From:Adrian Cornish Date:June 29 2010 12:15am
Subject:Fwd: Strange query problem
View as plain text  
Opps forgot to forward to list too

---------- Forwarded message ----------
From: Adrian Cornish <mysql@stripped>
Date: 28 June 2010 18:12
Subject: Re: Strange query problem
To: Алексей Болгов <bolgov.ak@stripped>


On 28 June 2010 15:41, Алексей Болгов <bolgov.ak@stripped> wrote:

> Hello. Have a strange problem with query. Hope you'll help.
> If i try to use  this query
>
> UPDATE `Graphs`.`Test` SET `Index` =  '1', `Period` = '1' WHERE
> `Test`.`Name` = 'Graph 3, order 9'
>
> it works fine.
>
> And when I'm using this query
>
> UPDATE `Graphs`.`Test` SET `Index` =  '1', `Period` = '1' WHERE
> `Test`.`Name` = 'Graph 3, order 9';
> UPDATE `Graphs`.`Test` SET `Index` =  '2', `Period` = '1' WHERE
> `Test`.`Name` = 'Graph 4, order 9';
> UPDATE `Graphs`.`Test` SET `Index` =  '1', `Period` = '1' WHERE
> `Test`.`Name` = 'Graph 5, order 9';
>
> I'm getting the error:
>
> You have an error in your SQL syntax; ... etc
>
> But in PHPMyAdmin this query works! Maybe it is due to the delimiters?
>

What you need is to set multi statement option before login

 mysqlpp::Connection conn;
conn.set_option(new mysqlpp::MultiStatementsOption(true));
conn.connect(... blah blah blah...)

Thread
Fwd: Strange query problemAdrian Cornish29 Jun
  • Re: Strange query problemJim Graf29 Jun
    • Re: Strange query problemWarren Young29 Jun