I use kohana ORM to get some results from the database. My problem is that although I consulted the documentation, I cannot find a way to select only the column that interests me. To be more explicit, I have:
$sale_stock = Model::factory('product_type')
->where('product_type_id','=', $id )
-> find_all();
var dumping it, it selects me all "SELECT product_type. * from product_type, where, etc.". But I want to select only the "stock" field from the salestock table. do find ('stock') instead of find_all () returns an object with a binding ... Where am I mistaken, and how can I actually only select the "margin" of a column using kohana orm?
Thank you!
source
share