CM_ERR_DATABASE
Invalid SQL: select CONCAT('http://127.0.0.1/','/images/route','/',r.dir,'/small/',p.name), p.name from route r, picture p where r.id=p.route_id and r.id= and SUBSTRING_INDEX(p.name,'.',1)=000
1064 (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 SUBSTRING_INDEX(p.name,'.',1)=000' at line 5)
CM_ERR_HALTED