Unknown column 'p_open' in 'where clause'