BP_XProfile_Query::__construct( array $xprofile_query )

Constructor.


Description Description


Parameters Parameters

$xprofile_query

(Required) Array of xprofile query clauses.

  • 'relation'
    (string) Optional. The MySQL keyword used to join the clauses of the query. Accepts 'AND', or 'OR'. Default 'AND'.
  • (array) Optional. An array of first-order clause parameters, or another fully-formed xprofile query.
    • 'field'
      (string|int) XProfile field to filter by. Accepts a field name or ID.
    • 'value'
      (string) XProfile value to filter by.
    • 'compare'
      (string) MySQL operator used for comparing the $value. Accepts '=', '!=', '>', '>=', '<', '<=', 'LIKE', 'NOT LIKE', 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN', 'REGEXP', 'NOT REGEXP', or 'RLIKE'. Default is 'IN' when $value is an array, '=' otherwise.
    • 'type'
      (string) MySQL data type that the value column will be CAST to for comparisons. Accepts 'NUMERIC', 'BINARY', 'CHAR', 'DATE', 'DATETIME', 'DECIMAL', 'SIGNED', 'TIME', or 'UNSIGNED'. Default is 'CHAR'.


Top ↑

Source Source

File: bp-xprofile/classes/class-bp-xprofile-query.php

	public function __construct( $xprofile_query ) {
		if ( empty( $xprofile_query ) ) {
			return;
		}

		$this->queries = $this->sanitize_query( $xprofile_query );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
2.2.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.