so I have this code:
$db = new Zend_Db_Adapter_Pdo_Mysql($params);
$sql = $db->select()->from(array("r" => "recc"), array("r_id" => "refID"))->joinLeft(array("c" => "comment"), "r.refID = c.refID");
$results = $db->fetchAll($sql);
print_r($results);
which is supposed to translate to this query:
SELECT refID AS r_id FROM recc r LEFT JOIN comment c ON r.refID = c.refID
which is supposed to only return a single column r_id and it indeed returned that single column when executed with mysql query browser
but then when you execute it with db select and print_r the results, in addition to r_id it also returned a whole bunch of fields in table comment which are populated with empty data...
did I do something wrong? how do I get the thing to only return the single column as planned...