Is there a way in recess framework to do a SELECT mycolumn1, mycolumn2 and not a SELECT * on the Model. I only find the $this->开发者_运维技巧model->select() function and it not allowing that.
Thank you,
The Recess framework is designed to return an object model when you try to query the database. So you are stuck with the select *, because every property of the object must be returned. It is possible to get around this if you access the PDO itself. For example:
$results = Databases::getSource('dataSourceName');
$set = $results->query("SELECT col1, col2 FROM table");
This will give you resultsSet object that you can iterate through. You won't be able to use the ->insert() and ->equal() and other wrapper methods on that object though.
精彩评论