2009-07-16 56 views

回答

15

這其實很簡單。 select對象實現了一個toString方法。

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

或者

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

或$ SQL =(字符串)$選擇; – smack0007 2009-07-17 14:05:57

2

或將它轉換爲字符串,然後使用它:

(string)$table->select();