Bug #3745 | Error while executing multiple operations in one query (ASP/MyODBC) | ||
---|---|---|---|
Submitted: | 13 May 2004 16:12 | Modified: | 13 May 2004 18:22 |
Reporter: | TEHEK tehek | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | Connector / ODBC | Severity: | S1 (Critical) |
Version: | 3.51.6, 3.51.7 | OS: | Windows (Windows XP, Windows 2000) |
Assigned to: | Dean Ellis | CPU Architecture: | Any |
[13 May 2004 16:12]
TEHEK tehek
[13 May 2004 18:22]
Dean Ellis
Subqueries and multiple statements within the same batch are implemented within MySQL 4.1. There is no support for them in 4.0; some clients appear to support multiple statements with 4.0 but they are simply breaking your batch into multiple queries.
[27 Oct 2004 14:57]
Davis Drury
I have the same issue with MYSQL 5. I'm converting an ASP page from acessing a MSSQL database to MYSQL, and having a problem where a SQL statement inserts some data and then returns the newly created identity key (eg. Insert into table values(null,1,2); select @@identity as 'identity'). This works fine through MYSQL query analyser, but fails on the ASP page. It doesn't like having multiple selects (tried simple test of two selects and it fails also). Wonder is this a limitation - or is there some sort of other syntax ot use?
[12 Mar 2005 9:06]
[ name withheld ]
I too am having the problem on a MySQL 4.1.10-MAX server. Ive tried everything from using InnoDB tables to changing syntax. And I stll have the same 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 '; INSERT IGNORE INTO table (column) VALUES ( Figured it might have something to do with the IGNORE for some odd reason, but that turned up nothing. This is on a Gentoo Linux 2004.2 system using the php API for the connector.
[15 Mar 2005 14:15]
Dean Ellis
You must be using the newer server versions, _and_, you must explicitly enable support for multiple statements via the API you are using. For PHP, this requires the mysqli extension available in PHP5.