ERROR:  syntax error at or near "AND"
LINE 1: select md,mt from ewf.meta_tags  where ctg= AND sub_ctg =
                                                    ^

select md,mt from ewf.meta_tags  where ctg= AND sub_ctg =

ERROR:  current transaction is aborted, commands ignored until end of transaction block

select id,title,to_char(etm,'HH:MI PM') as etm from ewf.story_1 order by 1 desc limit 10