FLEXIContent View in MySQL 07-20-2021

More
2 years 9 months ago #80489 by tazzarkin
I have a basic SQL query where I try to get data from the "flexicontent_fields_item_relations" table.  I have two FLEXIContent Custom Fields that I want to retrieve, RANK and YEAR.  I can get the 1st field, RANK (with field_id=20).  However, I can't get the 2nd field, YEAR (with field_id=21).  

Here is my SQL query:
Code:
SELECT content.id AS articleid, content.catid AS catid, content.title AS title, IF (flex.field_id='20', flex.value_integer, 'null') AS rank, IF (flex.field_id='21', flex.value_integer, 'null') AS year FROM xyz_content AS content, xyz_flexicontent_fields_item_relations AS flex WHERE content.id=flex.item_id AND flex.field_id='20'

My 2nd field, YEAR, always shows up as NULL. 

Can you help me write the correct statement so I can get the two custom fields?

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

More
2 years 9 months ago - 2 years 9 months ago #80490 by tazzarkin
I want to get both FLEXIContent Custom Fields on 1 line.

I want to get "rank" and "year" on the same line for each article.
Last edit: 2 years 9 months ago by tazzarkin.

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

More
2 years 9 months ago #80491 by micker
hello the goal of ? can explain more the context ?

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

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

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