>
>
> Is it possible to import a select query string into Zend_Db_Select and
> convert it to a select object? That would be pretty neat!
>
> <?php
>
> $sql = "SELECT * FROM `table` WHERE 1";
> $select = Zend_Db_Select::import($sql);
>
> ?>
>
>
This would be better:
<?php
$sql = <?sql SELECT * FROM `table` WHERE 1 ?>;
$select = Zend_Db_Select::import($sql);
?>
Where <?sql ?> is an SQL parser that returns an SQL object. I guess some
minor tweeks to the PHP parser would be needed for this.
monk.e.boy
--
View this message in context: http://www.nabble.com/re-2-%3A--fw-db--Using-the-Zend_Db_Table-to-return-referenced-row-values-tp18728740p18750248.html
Sent from the Zend DB mailing list archive at Nabble.com.
没有评论:
发表评论