proper syntax for concat in $query-> format

24 views
Skip to first unread message

Chris Paschen

unread,
Feb 20, 2018, 4:07:31 PM2/20/18
to Joomla! General Development

I need to do a basic select with a concat, something like this

SELECT
id,
CONCAT(a.lastname,', ',a.firstname) as name
FROM #__people as a

But I want to put it within the proper $query->select type structure.

I can't find any examples of the syntax anywhere online (well, Google can't) and can't seem to find anything similar being used within any extensions that I have installed.

Anyone have a link to a good link to (or your own) example you could share?

--
Chris Paschen
Paschen Communications, LLC

Chris Paschen, President

Paschen Communications, LLC

p: (651) 204-9218 | e: cpas...@paschencommunications.com
m: Box 9207, St. Paul, MN 55109
w: http://www.PaschenCommunications.com

View Chris Paschen's LinkedIn profile View Chris Paschen's profile

Follow @cpaschen

Chris Paschen

unread,
Feb 20, 2018, 5:12:54 PM2/20/18
to Joomla! General Development

Ignore that. Just a couple searches more and found the answer on the Joomla api docs (https://api.joomla.org/cms-3/classes/JDatabaseQuery.html)

--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-gene...@googlegroups.com.
To post to this group, send email to joomla-de...@googlegroups.com.
Visit this group at https://groups.google.com/group/joomla-dev-general.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages