Got it smoothly working with phalcon 2.x but not working with phalcon 3.x
$data = new BlanketItemTb();
$sql = "SELECT iit.item_id, iit.item_description, format(bit.ordered_quantity,0) as ordered_quantity, format(bit.remaining_quantity,0) as remaining_quantity
FROM blanket_item_tb bit
LEFT JOIN item_inventory_tb iit ON bit.item_id = iit.item_id
WHERE bit.blanket_id = '$blanket_id' ORDER BY iit.item_id";
return new Resultset(
null,
$data,
$data->getReadConnection()->query($sql)
);