ensure_my_table(); $this->query->add_field('uc_coupons', 'data'); if (!empty($this->argument)) { $regexp = '.*product_types.*{[^}]*(' . $this->argument . ').*}'; $this->query->add_where_expression(0, 'uc_coupons.data ' . 'REGEXP :re', array(':re' => $regexp) ); } //. ($this->options['operator'] !== 'in' ? "NOT " : "") } }