| @@ -179,9 +179,9 @@ | ||
| 179 | 179 | * |
| 180 | 180 | * @return array |
| 181 | 181 | */ |
| 182 | 182 | public function get_col( $column_name, $where ) { |
| 183 | - $where_clause = count( $where ) ? 'WHERE ' . QueryHelper::prepare_where_clause( $where ) : ''; | |
| 183 | + $where_clause = count( $where ) ? 'WHERE ' . QueryHelper::build_where_clause( $where ) : ''; | |
| 184 | 184 | $query = $this->db->prepare( "SELECT {$column_name} FROM {$this->table_name} {$where_clause}" ); |
| 185 | 185 | |
| 186 | 186 | return $this->db->get_col( $query ); |
| 187 | 187 | } |
| @@ -234,14 +234,14 @@ | ||
| 234 | 234 | } |
| 235 | 235 | |
| 236 | 236 | if ( isset( $args['where'] ) && is_array( $args['where'] ) ) { |
| 237 | 237 | $where = $args['where']; |
| 238 | - $where_clause = count( $where ) ? 'WHERE ' . QueryHelper::prepare_where_clause( $where ) : ''; | |
| 238 | + $where_clause = count( $where ) ? 'WHERE ' . QueryHelper::build_where_clause( $where ) : ''; | |
| 239 | 239 | } |
| 240 | 240 | |
| 241 | 241 | if ( isset( $args['search'] ) && is_array( $args['search'] ) ) { |
| 242 | 242 | if ( count( $args['search'] ) ) { |
| 243 | - $where_clause .= ( empty( $where_clause ) ? 'WHERE ' : ' AND ' ) . QueryHelper::prepare_like_clause( $args['search'], 'AND' ); | |
| 243 | + $where_clause .= ( empty( $where_clause ) ? 'WHERE ' : ' AND ' ) . QueryHelper::build_like_clause( $args['search'], 'AND' ); | |
| 244 | 244 | } |
| 245 | 245 | } |
| 246 | 246 | |
| 247 | 247 | $orderby = $args['orderby'] ?? $this->primary_key; |