2008年7月31日星期四

Re: [fw-db] Using the Zend_Db_Table to return referenced row values

Hector Virgen wrote:
>
>
> 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.

没有评论: