[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?