Closed stephendwolff closed 5 years ago
If a space is added using CONCAT between two fields, it causes a query to fail. ie:
SELECT p.ID, f.Name, p.Subname, CONCAT(f.Code, " ", p.SubCode) FROM p LEFT JOIN f ON f.ID = p.F_ID
Where as this works (without the " ")
SELECT p.ID, f.Name, p.Subname, CONCAT(f.Code, p.SubCode) FROM p LEFT JOIN f ON f.ID = p.F_ID
Information
Expected output I would expect the query to return two fields joined, with a space between in a single column, ie:
(1, "B C"), (2, "D E"), (3, "F G"), (4, "H I"),
You may use raw object to this case. https://medoo.in/api/raw
Brilliant thanks. Just realised the query is a prepared statement. (Which I should have known).
If a space is added using CONCAT between two fields, it causes a query to fail. ie:
SELECT p.ID, f.Name, p.Subname, CONCAT(f.Code, " ", p.SubCode) FROM p LEFT JOIN f ON f.ID = p.F_ID
Where as this works (without the " ")
SELECT p.ID, f.Name, p.Subname, CONCAT(f.Code, p.SubCode) FROM p LEFT JOIN f ON f.ID = p.F_ID
Information
Expected output I would expect the query to return two fields joined, with a space between in a single column, ie:
(1, "B C"), (2, "D E"), (3, "F G"), (4, "H I"),