2010年4月16日星期五

[fw-db] Re: aggregete joins failing, looking for a workaround

decided to bypass the use of select() and just pass the straight query to a
zend_db object:

$sql = "select * from table";

$config = new Zend_Config_Ini( APPLICATION_PATH . DIRECTORY_SEPARATOR .
'configs' . DIRECTORY_SEPARATOR . 'application.ini',
getenv('APPLICATION_ENV'));
$db = Zend_Db::factory($config->resources->db->adapter,
$config->resources->db->params);
$db->getConnection();
return $db->fetchAll($sql);

returns an array of rows. not perfect but works
--
View this message in context: http://n4.nabble.com/aggregete-joins-failing-looking-for-a-workaround-tp2013446p2013595.html
Sent from the Zend DB mailing list archive at Nabble.com.

没有评论: