I am trying to use CONCAT with SQL to concatenate three fields and get the following error:
Incorrect parameters in calling native 'CONCAT' function
The request is as follows
SELECT CONCAT(guests.lastname,', ',guests.firstname', ',guests.passport) AS display FROM guests WHERE guests.uuid = '1'
How do you combine more than two fields in SQL?
You must put commas between all arguments.
Edit:
SELECT CONCAT(guests.lastname,', ',guests.firstname', ',guests.passport)
in
SELECT CONCAT(guests.lastname,', ',guests.firstname,', ',guests.passport) ^
SELECT CONCAT(guests.lastname,concat(', ',concat(guests.firstname,concat(', ',guests.passport))));