I need a query that do :
I need to update the favorite music genre (is associated a number to the genre) when the user listen songs. If the user lister 3 times the rock music and 2 times the pop music, the new favourite genre is the rock.
listened song are in listened
I use this query to export all the listened song for the user :
"SELECT DISTINCT * FROM albums WHERE id = ANY (SELECT album FROM Songs
WHERE id = ANY (SELECT played
FROM listened WHERE userhistory ='$nome')))
ORDER BY Rand() LIMIT 6");
I need a query that do :
I need to update the favorite music genre (is associated a number to the genre) when the user listen songs. If the user lister 3 times the rock music and 2 times the pop music, the new favourite genre is the rock.
listened song are in listened
I use this query to export all the listened song for the user :
"SELECT DISTINCT * FROM albums WHERE id = ANY (SELECT album FROM Songs
WHERE id = ANY (SELECT played
FROM listened WHERE userhistory ='$nome')))
ORDER BY Rand() LIMIT 6");