select * from mainproduct where mainproduct.status = 1 and category like '%117%' and sp >0 and sp <12600 Unknown column 'sp' in 'where clause'