2009-07-16 6 views

risposta

15

In realtà è davvero facile. L'oggetto select implementa un metodo toString.

$select = $table->select()->.... 
echo $select; //prints SQL 

O

$sql = $select->__toString(); 
+3

o $ sql = (string) $ selezionare; – smack0007

2

o gettarlo ai corda e quindi utilizzarlo:

(string)$table->select();