I'm trying to add a string to a mysql result set to save manipulating the results with php later.
This is what I want to do but it gives me an error.
SELECT 'new' AS condition
UNION
SELECT p.Name AS title, p.meta_desc AS description, p.product_Id AS id from products AS p
I can do this:
SELECT p.Name AS title, p.meta_desc AS description, p.product_Id AS id, 'new' from products AS p
but it gives new => new , ideally I would like the result column to be called 'descripiton' and retrieve 'condition' => 'new'