purencool Posted January 13, 2011 Share Posted January 13, 2011 hi phpfreaks I have been looking at this code below and it has got me . Can someone check it for me. The issue is it installs some tables into an application and then adds some data. The but the I keep getting the error below Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. The code last line of code is the one it is complaining about $db->exec("INSERT INTO Customer (Username,Passwd,Email,Phone) VALUES ('".$this->usernameadmin."', '".$this->passwordadmin."', '".$this->emailadmin."', '".$this->phoneadmin."')"); attached is complete method this is driving me nuts any help would be appreciated. [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/224260-is-my-sql-statement-wrong/ Share on other sites More sharing options...
Garethp Posted January 13, 2011 Share Posted January 13, 2011 No, that's not the problem. It seems like you're trying to execute two queries at once, by the looks of the error. Maybe you want to commit the transaction for creating tables before doing the insert? Sorry I can't be of more help, but atleast it should help you know that it's not the query itself Link to comment https://forums.phpfreaks.com/topic/224260-is-my-sql-statement-wrong/#findComment-1158686 Share on other sites More sharing options...
purencool Posted January 13, 2011 Author Share Posted January 13, 2011 thanks for your help Link to comment https://forums.phpfreaks.com/topic/224260-is-my-sql-statement-wrong/#findComment-1158690 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.