[add col "value"] problem with custom SQL select list field

More
11 years 2 months ago - 11 years 1 month ago #40208 by rottenberg
Hello,

In J3.1.5 FC V1769 (v1767 once installed), I have a problem with a Select list field :

I'm using a SQL select (The SQL tested in PhpMyadmin is good). Once entered in the configuration of the field I get only the sentence 'select value' and the last value of the select.
All others values have desappeared.

Best regards

Michel
Last edit: 11 years 1 month ago by rottenberg.

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #40291 by ggppdk
Hello,

do you mean that the query is not saved in field configuration and instead a part of is cut off ?

-- try replacing the new lines with space


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #40319 by rottenberg
No,
In the field description the SQL is complete.

It's only when executing it in an article : the select gives only the sentence 'select a value' and the last value given by the SQL.

best regards

Michel

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #40330 by ggppdk
Hello,

what is the query that you are using?


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #40333 by rottenberg
Code:
SELECT `wxyo9_content`.`id`as id, `wxyo9_content`.`title` as text FROM `wxyo9_flexicontent_items_ext`,`wxyo9_content` WHERE `wxyo9_flexicontent_items_ext`.`type_id` = 6 and `wxyo9_flexicontent_items_ext`.`item_id` = `wxyo9_content`.`id` and `wxyo9_content`.`state` = 1 order by text

is the select sentence.

When tested with phpmyadmin I get all the values.
When used inside FC I get only the last value.

best regards
Michel

Please Log in or Create an account to join the conversation.

More
11 years 1 month ago #40347 by ggppdk
Hello,

the name of the column is wrong

your query need to return 2 columns "value" and "text"

-- "text" is the displayed label and is also "language filter" meaning that you can add it to your language files
-- "value" can be same as text but if possible use something smaller e.g. a number to save DB space and achieve better performance too in large sites


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.431 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline