Welcome Guest, Not a member yet? Register   Sign In
MySQL Multi-Part Query Error: Solved
#1

[eluser]Eric Cope[/eluser]
I have a query where I copy data out of a innoDB table into a temporary MyISAM table for fulltext index searching. I checked that it works in phpMyAdmin. However when I use
Code:
$this->db->query($sql);
, I get the following error:

Code:
A Database Error Occurred

Error Number: 1064

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 INTO temp1( qID, quoteID, borrowerName, propertyAddress, userName, unde' at line 1

CREATE TEMPORARY TABLE temp1(qID INT,quoteID TEXT,borrowerName TEXT,propertyAddress TEXT, userName TEXT,underwriterName TEXT,FULLTEXT (quoteID,borrowerName,propertyAddress,userName)) ENGINE = MYISAM; INSERT INTO temp1( qID, quoteID, borrowerName, propertyAddress, userName, underwriterName ) SELECT qID, quoteID, borrowerName, propertyAddress, userName, underwriterName FROM Quotes WHERE companyID = 117; SELECT * FROM temp1 WHERE MATCH (quoteID, borrowerName, propertyAddress, userName) AGAINST ( 'Qubrey' ) LIMIT 50;

Here is my Query.
Code:
CREATE TEMPORARY TABLE temp1(qID INT,quoteID TEXT,borrowerName TEXT,propertyAddress TEXT, userName TEXT,underwriterName TEXT,FULLTEXT (quoteID,borrowerName,propertyAddress,userName)) ENGINE = MYISAM ;
INSERT INTO temp1( qID, quoteID, borrowerName, propertyAddress, userName, underwriterName ) SELECT qID, quoteID, borrowerName, propertyAddress, userName, underwriterName FROM Quotes WHERE companyID = 117;
SELECT * FROM temp1 WHERE MATCH (quoteID, borrowerName, propertyAddress, userName) AGAINST ( 'Qubrey' ) LIMIT 50;

Any ideas why this is failing?


Messages In This Thread
MySQL Multi-Part Query Error: Solved - by El Forum - 01-22-2010, 01:51 AM
MySQL Multi-Part Query Error: Solved - by El Forum - 01-22-2010, 02:40 AM
MySQL Multi-Part Query Error: Solved - by El Forum - 01-22-2010, 02:42 AM
MySQL Multi-Part Query Error: Solved - by El Forum - 01-22-2010, 02:50 AM
MySQL Multi-Part Query Error: Solved - by El Forum - 01-22-2010, 03:00 AM
MySQL Multi-Part Query Error: Solved - by El Forum - 01-22-2010, 03:22 AM



Theme © iAndrew 2016 - Forum software by © MyBB