Closed fillibuster77 closed 5 years ago
This is not a supported syntax. Raw join gives you one condition. Note the constraint var in the source code from idiorm below.
/**
* Add a RAW JOIN source to the query
*/
public function raw_join($table, $constraint, $table_alias, $parameters = array()) {
// Add table alias if present
if (!is_null($table_alias)) {
$table_alias = $this->_quote_identifier($table_alias);
$table .= " {$table_alias}";
}
$this->_values = array_merge($this->_values, $parameters);
// Build the constraint
if (is_array($constraint)) {
list($first_column, $operator, $second_column) = $constraint;
$first_column = $this->_quote_identifier($first_column);
$second_column = $this->_quote_identifier($second_column);
$constraint = "{$first_column} {$operator} {$second_column}";
}
$this->_join_sources[] = "{$table} ON {$constraint}";
return $this;
}
For more complex queries see the raw query docs https://idiorm.readthedocs.io/en/latest/querying.html#raw-queries
Hi, is it possible to use multiple Join Conditions in an IDIORM query? I tried this, but it doesnt work: