afriend wrote: 
> What I can't understand is why DynamicPlaylist is fine with a custom sql
> playlist definition when it comes via SQLplaylist but not when it's
> supplied by my plugin. I must have made a mistake somewhere, maybe in
> the bind_col? Or some syntax stuff?
> As I said, playlist *1* ("Rated") *works fine*. 
> 
I think the problem is that you can’t send multiple sql statements to
prepare and execute method. SQL playlist splits the string so you have
one string per statement and call prepare/execute for each statement.
You can in the SQL playlist code see the split at line 1069:
https://github.com/erland/lms-sqlplaylist/blob/5955592540b5c157518edf61a731b5ca484c8813/src/Plugin.pm#L1069
As you can see it iterates the result in a för-loop and calls
prepare/execute for each iteration and if it’s a select it additionally
call bind_col/fetch to get the result.

Playlist 1 works because it consists of a single select statement.



Erland Isaksson ('My homepage' (http://erland.isaksson.info))
Developer of 'many plugins/applets'
(https://wiki.slimdevices.com/index.php/User_Erland.html)
*Starting with LMS 8.0 I no longer support my plugins/applets* ('see
here for more information'
(https://forums.slimdevices.com/showthread.php?49483-Announce-New-versions-of-erlands-plugins&p=998836&viewfull=1#post998836)
)
------------------------------------------------------------------------
erland's Profile: http://forums.slimdevices.com/member.php?userid=3124
View this thread: http://forums.slimdevices.com/showthread.php?t=113344

_______________________________________________
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to