mea culpa,

i am rusty and old and i am not using Earlands plugin - just sqlite.

How to find a match between FUNK and Dance?


Code:
--------------------
    sqlite> select id from genres where name like 'Funk' or name like 'Dance';
  18
  28
  
--------------------


In this case Funk is 18 and Dance is 28
Lets build some temp Tables:

Code:
--------------------
    
  sqlite> CREATE TEMPORARY TABLE DANCE AS select id,url from genre_track, 
tracks where genre_track.track = tracks.id and genre_track.genre like '18';
  sqlite> CREATE TEMPORARY TABLE FUNK AS select id,url from genre_track, tracks 
where genre_track.track = tracks.id and genre_track.genre like 28;
  
--------------------


Now find the matching numbers

Code:
--------------------
    
  sqlite> select FUNK.url, FUNK.id, DANCE.id from  FUNK INNER JOIN DANCE on 
DANCE.id = FUNK.id;
  
file:///media/music/W/Womack%20&%20Womack/Teardrops/Womack%20&%20Womack%20-%20Teardrops%20-%2001%20-%20Teardrops%20(Extended%20Remix).mp3|55557|55557
  
file:///media/music/W/Womack%20&%20Womack/Teardrops/Womack%20&%20Womack%20-%20Teardrops%20-%2002%20-%20Teardrops.mp3|55558|55558
  sqlite>
  
--------------------


open Trashcan

Code:
--------------------
    
  sqlite> drop table DANCE;
  sqlite> drop table FUNK;
  
--------------------


Now you have to fiddle out how to manage that with earlands plugin and i
am pretty sure there is enough place for improvement.


------------------------------------------------------------------------
DJanGo's Profile: http://forums.slimdevices.com/member.php?userid=1516
View this thread: http://forums.slimdevices.com/showthread.php?t=109818

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to