I have three tables. One is called "asset" which holds item asset names, one is called "catalog" which just defines catalog list names, and a third called "catalog_asset" which combines the other two and makes it possible to contain assets within the catalog.
Right now I AM able to execute the following query to determine all of the assets inside of the catalog. This query works!
select name from asset where id in (select asset_id from catalog_asset where catalog_id='SHOP_1_LIST');
The result is something like:
and so on.
However, what I now want is kind of reverse it...to be able to query 1 asset (from table 'asset') from and to display the catalog name in which it resides (from table catalog_asset).
I tried reversing the above query in a way I thought it would work, but it did not work at all...
select catalog_id from catalog_asset where exists (select name from asset where id = '2740');
I want the result to show which catalog the asset resides in (can be multiple):
Basically I can query which assets are residing in a catalog, but I am unable to query an asset to see which catalog it resides in.
I am currently working on a tool made in php and I need to display the catalog name.