Complex Field Queries [SOLVED]

More
12 years 7 months ago #18883 by ggppdk
This is included (and debugged) in flexicontent v1.5.6beta1

Regards


-- 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
12 years 7 months ago #18959 by Brat
Replied by Brat on topic Complex Field Queries [SOLVED]
The queries work excellently. Thanks to this, I have made huge progress in my project. Just marked as SOLVED.

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

More
12 years 7 months ago #18967 by micker
brat it possible to do a quick tutoriel ?
thanks

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.

More
12 years 7 months ago #18973 by ggppdk
Yes you can use replacements in the sql query to get information for current item:

{item->created_by} (userid of owner)
{item->modified_by} (userid of last modifier)
{item->catid} (main category of the item)
{item->...}

to see available columns to a :
echo "<pre>"; print_r($item); exit();

e.g. in your template file item.php of the item view, or inside the select and selectmultiple plugin

Regards


-- 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
12 years 7 months ago #18989 by micker
same for category view ?

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.

More
12 years 7 months ago #19000 by ggppdk
My post was confusing , i just meant to provide a way to see what is available for an item.

The replacement e.g. {item->created_by} etc is meant to be used in the sql code of select and selectmultiple , and it will work anywhere , any view.

The replacement occurs inside the plugin code of the select & selectmultiple field.

To use replacement do this:

1. You create a new selectmultiple (or select) field

2. You set the options of the field to be created by by setting to YES the option "Use Sql Query"

3. Inside the textarea 'Field Elements', you write:

(a) e.g. to create a select field that contains all items of the owner of the current item:
Code:
SELECT c.id AS value, c.title AS text FROM #__content AS c WHERE created_by={item->created_by}
(b) e.g. to create a select field that contains all items of the same main category as the current item:
Code:
SELECT c.id AS value, c.title AS text FROM #__content AS c WHERE created_by={item->catid}
Regards


-- 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.282 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