my question title may not really describe my problem sorry for that. I am undertaking database module. Thus, my sql query must be complicated and able to do in a single query
I have two table one is category
- catid int
- catname varchar
another table is product
- productid int
- catid references category(catid)
- productname
now i want to do a select statement which select catname + an array of products under that cat, is it possible to do this in a single query like
SELECT a.catname,(b.productname bla bla in an array)
from category a, product b WHERE a.catid=b.catid
i dont know if this is possible, if yes please help me