I have a table A with the following definition in MySQL
----------------------------------
id c_id t_id
-------------------------------
where c_id references cid on another table B with the following definition
================================================
id cid cname
=================================================
So i am issuing the following query
select group_concat(cname) as list
from A join B using (cid)
where t_id="something";
But I m getting the following error
Unknown column "cid" in from clause
I tried changing it to “c_id”, but that doesnt seem to work either..
Any help is appreciated.
Thanks
USINGin MySQL is just a short form for a standardONclause, and only works when the column name is identical in both tables.From the manual:
Instead, do this: