New release 2.0.7
[fa-stable.git] / gl / includes / db / gl_db_bank_trans_types.inc
1 <?php
2
3 function add_bank_trans_type($name)
4 {
5         $sql = "INSERT INTO ".TB_PREF."bank_trans_types (name) VALUES (".db_escape($name).")";
6
7         db_query($sql, "could not add bank transaction type");
8 }
9
10 function update_bank_trans_type($type_id, $name)
11 {
12         $sql = "UPDATE ".TB_PREF."bank_trans_types SET name=".db_escape($name)."        WHERE id=$type_id";
13
14         db_query($sql, "could not update bank transaction type");
15 }
16
17 function get_all_bank_trans_type()
18 {
19         $sql = "SELECT * FROM ".TB_PREF."bank_trans_types";
20
21         return db_query($sql, "could not get all bank transaction type");
22 }
23
24 function get_bank_trans_type($type_id)
25 {
26         $sql = "SELECT * FROM ".TB_PREF."bank_trans_types WHERE id=$type_id";
27
28         $result = db_query($sql, "could not get bank transaction type");
29
30         return db_fetch($result);
31 }
32
33 function delete_bank_trans_type($type_id)
34 {
35         $sql="DELETE FROM ".TB_PREF."bank_trans_types WHERE id=$type_id";
36
37         db_query($sql, "could not delete bank transaction type");
38 }
39
40 ?>