concat in query calc element

leblancphil

Member
I have tried many ways to do this
.....
$myQuery
->select (concat ('nom,' ',prenom')).....

no pb with the query itself but I cant find the correct concat way

Some idea ?
Thanks
 
Hello

By one of this ways maybe:

Code:
$myQuery
->select (concat (firstname, ' ', lastname)).....

Code:
my_table___field1,' text value ', my_table___field2, 'punctuation'

or sometime this:
Code:
return '{my_table___price_field} Euros' ;
 
You have to quote it, like ...

$myQuery->select("CONCAT(firstname, ' ', lastname) AS fullname");

Depending on exactly what you are doing, you don't have to use the "AS some_field_name", but it doesn't hurt to use it.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top