/** * Build the sql query. * * @since 1.0 * * @return string */ protected function build_sql() { $builder = new Builder(); $select = $this->parse_select(); $from = new From($this->table->get_table_name($GLOBALS['wpdb']), 'q'); $where = new Where(1, true, 1); if (($activation = $this->parse_activation()) !== null) { $where->qAnd($activation); } if (($release = $this->parse_release()) !== null) { $where->qAnd($release); } if (($update_date = $this->parse_update_date()) !== null) { $where->qAnd($update_date); } $order = $this->parse_order(); $limit = $this->parse_pagination(); $builder->append($select)->append($from); $builder->append($where); $builder->append($order); if ($limit !== null) { $builder->append($limit); } return $builder->build(); }
/** * Build the sql query. * * @since 1.0 * * @return string */ protected function build_sql() { $builder = new Builder(); $select = $this->parse_select(); $from = new From($this->table->get_table_name($GLOBALS['wpdb']), 'q'); $where = new Where(1, true, 1); if (($transaction = $this->parse_transaction()) !== null) { $where->qAnd($transaction); } if (($key_like = $this->parse_key_like()) !== null) { $where->qAnd($key_like); } if (($product = $this->parse_product()) !== null) { $where->qAnd($product); } if (($customer = $this->parse_customer()) !== null) { $where->qAnd($customer); } if (($max = $this->parse_max()) !== null) { $where->qAnd($max); } if (($status = $this->parse_status()) !== null) { $where->qAnd($status); } if (($expires = $this->parse_expires()) !== null) { $where->qAnd($expires); } $order = $this->parse_order(); $limit = $this->parse_pagination(); $builder->append($select)->append($from); $search = $this->parse_customer_search(); if ($search !== null) { $builder->append($search); } $builder->append($where); $builder->append($order); if ($limit !== null) { $builder->append($limit); } return $builder->build(); }
/** * Build the sql query. * * @since 1.0 * * @return string */ protected function build_sql() { $builder = new Builder(); $select = $this->parse_select(); $from = new From($this->table->get_table_name($GLOBALS['wpdb']), 'q'); $where = new Where(1, true, 1); if (($product = $this->parse_product()) !== null) { $where->qAnd($product); } if (($download = $this->parse_download()) !== null) { $where->qAnd($download); } if (($status = $this->parse_status()) !== null) { $where->qAnd($status); } if (($type = $this->parse_type()) !== null) { $where->qAnd($type); } if (($version = $this->parse_version()) !== null) { $where->qAnd($version); } if (($version_search = $this->parse_version_search()) !== null) { $where->qAnd($version_search); } if (($changelog_search = $this->parse_changelog_search()) !== null) { $where->qAnd($changelog_search); } if (($start_date = $this->parse_start_date()) !== null) { $where->qAnd($start_date); } $order = $this->parse_order(); $limit = $this->parse_pagination(); $builder->append($select)->append($from); $builder->append($where); $builder->append($order); if ($limit !== null) { $builder->append($limit); } return $builder->build(); }
/** * Build the sql query. * * @since 1.0 * * @return string */ protected function build_sql() { $builder = new Builder(); $select = $this->parse_select(); $from = new From($this->table->get_table_name($GLOBALS['wpdb']), 'q'); $where = new Where(1, true, 1); if (($key = $this->parse_key()) !== null) { $where->qAnd($key); } if (($location = $this->parse_location()) !== null) { $where->qAnd($location); } if (($location_search = $this->parse_location_search()) !== null) { $where->qAnd($location_search); } if (($status = $this->parse_status()) !== null) { $where->qAnd($status); } if (($activation = $this->parse_activation()) !== null) { $where->qAnd($activation); } if (($deactivation = $this->parse_deactivation()) !== null) { $where->qAnd($deactivation); } if (($release = $this->parse_release()) !== null) { $where->qAnd($release); } $order = $this->parse_order(); $limit = $this->parse_pagination(); $builder->append($select)->append($from); if (($join = $this->parse_join()) !== null) { $builder->append($join); } $builder->append($where); $builder->append($order); if ($limit !== null) { $builder->append($limit); } return $builder->build(); }