| List: | MySQL++ | « Previous MessageNext Message » | |
| From: | Attila | Date: | September 15 2010 2:34pm |
| Subject: | How to execute multiple SQL instructions in one step | ||
| View as plain text | |||
Hi Everyone,
I am using the following to try and execute a lock on table and then in
update:
const char* sql = "LOCK TABLES MyTable WRITE;UPDATE MyTable SET status=
'STARTED' WHERE status_id= '7' AND address = 167473977; UNLOCK TABLES;";
// m_pConnection is a mysqlpp::Connection
mysqlpp::Query query = m_pConnection->query(sql);
mysqlpp::StoreQueryResult storeResult(query.store());
However this gives me a syntax error. Is there any way to accomplish the
above in one call?
Thank you,
--
A
| Thread | ||
|---|---|---|
| • How to execute multiple SQL instructions in one step | Attila | 15 Sep |
| • Re: How to execute multiple SQL instructions in one step | Jonathan Wakely | 15 Sep |
| • Re: How to execute multiple SQL instructions in one step | Attila | 15 Sep |
