I’m trying to combine/UNION 2 set of tables like this…
SELECT img_small
, homeclub
, seouname
, CONCAT(fname,' ',lname) AS name
FROM ".$prefix."_users WHERE CONCAT(fname,' ',lname) LIKE '%" . $queryString . "%'
UNION
SELECT '' AS dummy1
, '' AS dummy2
, seoname,
, clubname AS name
FROM ".$prefix."_users WHERE name LIKE '%" . $queryString . "%'
ORDER BY name LIMIT 8
It’s not working though, I got this error:
Right syntax to use near: WHERE clubname AS name…
Where do I go wrong?