2015-03-21 03:15:44 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Created by PhpStorm.
|
|
|
|
* User: liujin834
|
|
|
|
* Date: 3/8/15
|
|
|
|
* Time: 2:29 PM
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace Westdc\Db\Record;
|
|
|
|
|
|
|
|
use Zend\Db\Sql;
|
|
|
|
use Westdc\Db\Db;
|
|
|
|
|
|
|
|
class Select {
|
|
|
|
|
|
|
|
public function ResultSetToArray(Sql\Select $select){
|
|
|
|
|
|
|
|
$adapter = Db::getInstance();
|
|
|
|
$result = $adapter->query($select->getSqlString($adapter->getPlatform()),$adapter::QUERY_MODE_EXECUTE);
|
|
|
|
return $result->toArray();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2015-03-26 15:11:43 +00:00
|
|
|
public function GetSql(Sql\Select $select){
|
|
|
|
$adapter = Db::getInstance();
|
|
|
|
return $select->getSqlString($adapter->getPlatform());
|
|
|
|
}
|
|
|
|
|
2015-03-21 03:15:44 +00:00
|
|
|
}
|