You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and length(published)>0 order by sort asc, phDate desc' at line 1
select phId, phNameru, date_format(phDate,'%d.%m.%Y') from tbphotoalbum where sprId= and length(published)>0 order by sort asc, phDate desc
|
|||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||