g613 / asterisk-cdr-viewer

Simple and fast viewer for asterisk CDRs / recordings
54 stars 33 forks source link

Error in your SQL syntax when Source and Destination Channel is used. #31

Closed klavo closed 7 years ago

klavo commented 8 years ago

When I run a report that has a source and destination channel select I receive a SQL syntax error.

I'm trying to run a report to see how many concurrent calls there are over the Digium G100 connection. The error only seems to occur with concurrent calls. If I change the report to CDR with the same search parameters it seems to work.

PDO::errorInfo(): Array ( [0] => 42000 [1] => 1064 [2] => You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND dstchannel LIKE 'SIP/g100%' src LIKE 'SIP/g100%' ) ORDER BY unix_' at line 1 )

g613 commented 7 years ago

fixed in 1.0.11

sinyb commented 7 years ago

Might be related: getting similar error in 1.0.11 (latest git pull), only with "Concurrent calls", without any filter, same when running report for a month or for just a day:

PDO::errorInfo(): Array ( [0] => 42000 [1] => 1064 [2] => You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') ORDER BY unix_timestamp(calldate) ASC LIMIT 10000' at line 1 )

System: openSUSE LEAP 42.2, updated, MariaDB 10.0.30, PHP 5.5.14