Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 112

Přidáno uživatelem Jiří Sviták před asi 16 roky(ů)

pridany funkce na nacteni tabulky money_transfers - get_all_money_transfers, count_all_money_transfers

Zobrazit rozdíly:

freenetis/trunk/kohana/application/models/money_transfer.php
}
return $cout_credit;
}
public function count_all_money_transfers()
{
return self::$db->count_records('money_transfers');
}
public function get_all_money_transfers()
{
return self::$db->query('SELECT mt.*, mt.id AS mtid,
bi.*, bi.name AS bi_name,
orig_acc.*, orig_acc.name AS orig_acc_name,
dest_acc.*, dest_acc.name AS dest_acc_name
FROM money_transfers AS mt
LEFT JOIN money_transfer_bank_infos AS bi
ON bi.id = mt.bank_info_id
LEFT JOIN accounts AS orig_acc
ON orig_acc.id = mt.origin_id
LEFT JOIN accounts AS dest_acc
ON dest_acc.id = mt.destination_id
ORDER BY mt.timestamp DESC');
}
}

Také k dispozici: Unified diff