Can't perform query on database Error: Unknown column '40d' in 'where clause'