Re: Having trouble with SQL query

2012-08-26 Thread Nitin Mehta
I'm more of an hit and try guy and do good only with a data set available. Still I think making a little change might do the trick.     SELECT DISTINCT     p.productid,     pd.name FROM menu_product as p INNER JOIN menu as m ON (m.menuid = p.menuid AND m.name = '') INNER JOIN produ

Having trouble with SQL query

2012-08-26 Thread rich gray
I have a MySQL database with a menu table and a product table linked to the menus *(each product can be linked to more than menu row)* and the menus are nested. The query is that when a user clicks on a menu entry then all products linked to that entry *(there may be none)* will get displayed