erland wrote: 
> 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.

I think I'm getting there. I haven't been able to test all my playlists
yet because I can't get the decades parameter (select decades) to work.

the sql for the decades parameter (type custom) is:

Code:
--------------------
    select cast(((tracks.year/10)*10) as int),case when tracks.year>0 then 
cast(((tracks.year/10)*10) as int)||'s' else 'Unknown' end from tracks where 
tracks.audio=1 group by cast(((tracks.year/10)*10) as int) order by tracks.year 
desc
--------------------


which gives me


Code:
--------------------
    Slim::Schema::Storage::throw_exception (121) Error: DBI Exception: 
DBD::SQLite::st bind_columns failed: bind_columns called with 3 values but 2 
are needed
--------------------


As you can see I haven't used your sqllite concat and floor functions.
But the error is an old one that I already know from when I was using
SQLplaylist with DPL. The decades query always gave me the very same
error but DPL just continued regardless (while my plugin breaks).
So it seems now that I'm doing this in my plugin I need to fix this sql
error or else I can't use any playlist with decades selection.

Do you have any idea how to fix this error?


------------------------------------------------------------------------
afriend's Profile: http://forums.slimdevices.com/member.php?userid=39306
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