MySQL Forums
Forum List  »  PHP

Re: Query divides movie titles into different columns
Posted by: Luigi Chiabrera
Date: November 16, 2019 03:11AM

good morning Peter,
I think it can be fine

a.actor_id actId,
a.act_img actImg,
group_concat(DISTINCT f1.title ORDER BY f1.film_id) title
(select film_id,actor_id
from film_actor where actor_id = 1) fa1 inner join film f1 ON fa1.film_id = f1.Film_id
inner join actor a ON fa1.actor_id = a.actor_id

--- result

actId actImg title

1 l_blair.jpg Exorcist-I,Exorcist-II

Options: ReplyQuote

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.