Error query:
select count(*) as Co from Contacts where  DisplayOff='0'  and DisplayOff=0 and (DirectoryId in (0,'')  or DirectoryId regexp '(,+|^)5(,+|$)') and LangVer!=2 
Unknown column 'DirectoryId' in 'where clause'