Good morning. I need to mix both queries in one
SELECT nombre_categoria from tablacategorias where id_categoria=1;
select * from videos A where A.categorias;
What I try is: In the "tablacategorias" I want you to return the name of the category according to the id that happened to you. Once I have the "category name" I want to get from the "videos" table all the videos that have that category.
I need it to be through LIKE, since a video can have more than one category. In my case the categories go in the same field separated by commas. Example: Drama, comedy, action
The result would be something like this:
select * from videos A where A.categorias like '%(SELECT nombre_categoria from tablacategorias where id_categoria=1)%'