I've sql query
select * from table1
left join (values (4),(1800),(103500)) AS "filter (id) on table1.id=filter.id
By default Zend_Db_Select table quoted. For example:
$result = '(values (4),(1800),(103500)) AS filter (id)';
$select->joinInner($result, "table1.id = filter.id", '');
result:
SELECT * FROM "table1"
INNER JOIN "(values (4),(1800),(103500)) filter (id)" ON table1.id=filter.id
Me need
SELECT * FROM "table1"
INNER JOIN (values (4),(1800),(103500)) filter (id) ON table1.id=filter.id
How can disable quote table?
Try adding $result to your $select as a Zend_Db_Expr.
This is a little tricky. Look at the code below.
This code by default outputs the following statement which is not what we really want because identifier
filter (id)
is quoted. Here is the output.We need to disable
autoQuoteIdentifiers
in configuration options. For example:We get the following output
Note that in this case developer is responsible for quoting the identifiers when needed.
I think it's impossible to selectively disable quoting for one of the table alias. Well at least I found this impossible when reviewed 1.x Zend Framework code I have here locally ;)