ChronoEngine.com homepage

Forums

Please write a review for the extension you are using on the Joomla extensions directory before posting a new question as we are being spammed by many negative reviews.

Thank you for your support!

How to select DISTINCT(CONCAT(??? in the 'fields to retrieve' section

NickOg 03 Dec, 2018
Hi

I want to use
DISTINCT(CONCAT(mdlPublishedTerms.intYear,mdlPublishedTerms.txtTerm)):mdlPublishedTerms.publishedTerm
in a db read 'Fields to retrieve' section.

Or better still in select only records where CONCAT(mdlPublishedTerms.intYear,mdlPublishedTerms.txtTerm) is distinct

Any suggestions gratefully received.

Regards

Nick
healyhatman 03 Dec, 2018
Answer
Spaces between the elements.

DISTINCT( CONCAT( mdlPublishedTerms.intYear , mdlPublishedTerms.txtTerm)):mdlPublishedTerms.publishedTerm
NickOg 03 Dec, 2018
Ye gods! That easy! Many thanks. My question is - how did you know that? Is there some general rule that I am missing??

Regards

Nick
healyhatman 03 Dec, 2018
from a glance at a forum post a year ago.
NickOg 07 Dec, 2018
Pushing a bit further - how can I set up WHERE to seelct records with the same id as a previous read??
mdlConvenersInfo.id/IN: ( {var:read_data96.mdlConveners})
That mdlConveners looks like this
undefinedundefined [array] 0undefinedundefined [array] mdlConvenersundefinedundefined [string] user_id = "587"undefinedundefined [array] 1undefinedundefined [array] mdlConvenersundefinedundefined [string] user_id = "600"undefinedundefined [array] 2undefinedundefined [array] mdlConvenersundefinedundefined [string] user_id = "605"
    I have a feeling that mdlConveners is wrong for the purpose.

    Regards

    Nick
    healyhatman 07 Dec, 2018
    mdlConvenersInfo.id/IN:{var:read_data96.model.field}
    Should do it
    This topic is locked and no more replies can be posted.

    2Checkout.com

    2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com