You are here: Home » Reply

Reply To: FireStats – Top 40 php script (now with added charts)

#14789

Iris
Participant

@sonichouse wrote:

@iris wrote:

I just update summary.php and here’s the error:

Unable to execute: select 'Songs' as Item,count(1) as Desc from songs union all select 'Playlists' as Item, count(1) as Desc from playlists union all select 'Albums' as Item, count(distinct album) as Desc from songs union all select 'Albums Played' as Item, count(distinct Album) as Desc from songs where play_count>0 union all select 'Songs Played' as Item, sum(play_count) as Desc from songs where play_count>0 union all select 'Unique Songs Played' as Item, count(1) as Desc from songs where play_count>0 ;

HY000 1 near "distinct": syntax error

Iris

Hi Iris,

sqlite2 does not like the

select 'Albums Played' as Item, count(distinct Album) as Desc from songs where play_count>0

bit in that sql. I will find an approach that does work – for now can you just comment out that one sql statement ?

Steve, to get that error to go away I basically (one at a time) eventually commented out all the lines from that section with the exception of ‘Unique Songs Played’ …

Iris