Jump to content

Recommended Posts

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!

Link to comment
https://forums.phpfreaks.com/topic/159772-need-some-help-with-mysql-50-query/
Share on other sites

  • 1 month later...

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!

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.