afriend wrote: 
> 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?

The error comes from line 1164 in Dynamic Playlist plugin code:
https://github.com/erland/lms-dynamicplaylist/blob/6a0c37c4d80e2ebeed307fc3620b757490186b76/src/Plugin.pm#L1164
As you can see it first try to call bind_columns with three parameters
and if that fails it calls it with two. So you would get the error from
the first call but the second should succeed. If you want to get rid of
the error you will need to provide a SQL that returns three columns. The
third column should contain the first character of the second column and
is used to provide quick access to different sections of a long result
sets. I don’t use the third parameter in the decades value in my
playlists since it should be a relatively short result set so no quick
navigation is needed. 

However, I don’t think your issue is caused by the error message it’s
probably something else causing the issue ?
Have you tried enabling debug logging on plugin.dynamicplaylist in
Settings/Advanced/Logging ? You should get a log entry from line 1180
that tells you if your SQL returns any rows:
https://github.com/erland/lms-dynamicplaylist/blob/6a0c37c4d80e2ebeed307fc3620b757490186b76/src/Plugin.pm#L1180
You can also try your SQL in a free form query in Database Query plugin
to see if it returns the expected result.

If you need more help I think it would be best if I could see the whole
code, could be something else than the SQL that’s causing the issue.



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
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to