[SOLVED] Select field and SQL problem

More
10 years 4 months ago - 10 years 4 months ago #48010 by Loire
Another day, another stupid question! :)
I have searched for an answer on this forum, but it brought me nothing.

Well, here:
I have created Field of type "Select List"
In "Values Creation" I turned on SQL and put this:

SELECT m_column AS text
FROM m_table
WHERE user_id = 125

I have 4 values with "125" at "user_id" and 1 with "100" (just for test)

Result in phpMyAdmin, when I run that query: 4 values
Result in Flexicontent: 1 value (Only last one. I have tried adding values, but as result there was always only last value)

So, query is correct (phpMyAdmin prooves it), connection to Database is correct (I have result from table), so I can't even imagine where problem can be.

And one more question: {item->created_by} is great, but can I find user's ID somehow?

FLEXIcontent version 2.1.3 r1857
Joomla! 3.2.3
Last edit: 10 years 4 months ago by Loire.

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

More
10 years 4 months ago #48021 by ggppdk
Hello

please see the popup description of the parameter

your SQL quesry needs to return 2 columns with name aliases: value and text
Code:
SELECT col1 AS value, col2 as text ...


-- 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
10 years 4 months ago #48030 by Loire
Thanks! Sorry for bothering you!
Should've guessed by myself.

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.296 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