-
Notifications
You must be signed in to change notification settings - Fork 25
2.2.1) Requests: GET Advanced Search
Marco Cesarato edited this page Apr 11, 2019
·
2 revisions
Note: These examples are valid only for GET and PUT requests
Search single value
where[column] = 1 // column = 1
where[column][=] = 1 // column = 1
where[column][!] = 1 // column != 1
where[column][>] = 1 // column > 1
where[column][<] = 1 // column < 1
where[column][%] = "%1" // column LIKE "%1"
Search multiple values
where[column] = array(1,5,7) // IN (...) (IN can be equal to an OR)
where[column][=] = array(1,5,7) // IN (...)
where[column][!] = array(1,5,7) // NOT IN (...)
where[column][>] = array(1,2) // column > 1 AND column > 2
where[column][<] = array(1,2) // column < 1 AND column < 2
where[column][%] = array("%1","%2") // column LIKE "%1" AND column LIKE "%2"
Specify column's table
where['table.column'][=] = array(1,5,7)
Compare between two different table columns
where['table_a.column_a'] = 'table_b.column_b'
Compare between different columns of main table
where['column_a'] = 'table_a.column_b'
// OR
where['table_a.column_a'] = 'table_a.column_b'
// WRONG
where['column_a'] = 'column_b'