alexszilagyi Posted May 26, 2009 Share Posted May 26, 2009 Hi there!, I have a query that I think it is written in the 5th version of MySQL and my web server has only the 4th one. Actually it is a plugin for CB Builder [Joomla 1.5]. The plugin is called CB Profile Flags and here is the query code[related to this error]: <query> SET @statefieldid=(SELECT fieldid FROM `#__comprofiler_fields` WHERE `name`='cb_state'); </query> and <query> SET @deletefieldid=(SELECT fieldid FROM `#__comprofiler_fields` WHERE `name`='cb_state'); </query> Can anybody help me to write the query to be compatible with the 4th version of MySQL? By the way here is the error which returns me when I'm trying to install it: SQL Error DB function failed with 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 'SELECT fieldid FROM `jos_comprofiler_fields` WHERE `name`='cb_s SQL=SET @statefieldid=(SELECT fieldid FROM `jos_comprofiler_fields` WHERE `name`='cb_state'); SQL = SET @statefieldid=(SELECT fieldid FROM `jos_comprofiler_fields` WHERE `name`='cb_state'); Thank you very much! Quote Link to comment https://forums.phpfreaks.com/topic/159772-need-some-help-with-mysql-50-query/ Share on other sites More sharing options...
fenway Posted June 2, 2009 Share Posted June 2, 2009 Why not just: SELECT @statefieldid:=fieldid FROM `#__comprofiler_fields` WHERE `name`='cb_state'; Quote Link to comment https://forums.phpfreaks.com/topic/159772-need-some-help-with-mysql-50-query/#findComment-847711 Share on other sites More sharing options...
alexszilagyi Posted July 6, 2009 Author Share Posted July 6, 2009 Yep, it works Thank you very much!!!! Well the queries should be SELECT @statefieldid:=fieldid FROM `#__comprofiler_fields` WHERE `name`='cb_state'; & SELECT @statefieldid:=fieldid FROM `#__comprofiler_fields` WHERE `name`='cb_country'; Thanks again! Quote Link to comment https://forums.phpfreaks.com/topic/159772-need-some-help-with-mysql-50-query/#findComment-870021 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.