Cheetah
ChDb.php
Go to the documentation of this file.
1 <?php
2 
8 // common database operations
9 
10 class ChDb extends Mistake
11 {
20  function getRow($query, $bindings = [], $arr_type = PDO::FETCH_ASSOC)
21  {
22  return ChWsbDb::getInstance()->getRow($query, $bindings, $arr_type);
23  }
24 
32  function getOne($query, $bindings = [])
33  {
34  return ChWsbDb::getInstance()->getOne($query, $bindings);
35  }
36 
42  function getColumn($query, $bindings = [])
43  {
44  return ChWsbDb::getInstance()->getColumn($query, $bindings);
45  }
46 
56  function getFirstRow($query, $bindings = [], $arr_type = PDO::FETCH_ASSOC)
57  {
58  return ChWsbDb::getInstance()->getFirstRow($query, $bindings, $arr_type);
59  }
60 
64  function getNextRow()
65  {
66  return ChWsbDb::getInstance()->getNextRow();
67  }
68 
75  function getNumRows($res = null)
76  {
77  return ChWsbDb::getInstance()->getAffectedRows($res);
78  }
79 
83  function getLastId()
84  {
85  return ChWsbDb::getInstance()->lastId();
86  }
87 
95  function query($query, $bindings = [])
96  {
97  return ChWsbDb::getInstance()->query($query, $bindings);
98  }
99 
108  function getAll($query, $bindings = [], $arr_type = PDO::FETCH_ASSOC)
109  {
110  return ChWsbDb::getInstance()->getAll($query, $bindings, $arr_type);
111  }
112 
117  function escape($s)
118  {
119  return ChWsbDb::getInstance()->escape($s, false);
120  }
121 
122  function unescape($s)
123  {
124  return ChWsbDb::getInstance()->unescape($s, false);
125  }
126 }
ChDb\getAll
getAll($query, $bindings=[], $arr_type=PDO::FETCH_ASSOC)
Definition: ChDb.php:108
ChDb\getOne
getOne($query, $bindings=[])
Definition: ChDb.php:32
ChDb\getLastId
getLastId()
Definition: ChDb.php:83
php
ChDb\getFirstRow
getFirstRow($query, $bindings=[], $arr_type=PDO::FETCH_ASSOC)
Definition: ChDb.php:56
Mistake
Definition: Mistake.php:11
ChDb\getNextRow
getNextRow()
Definition: ChDb.php:64
ChDb\getNumRows
getNumRows($res=null)
Definition: ChDb.php:75
ChDb\getRow
getRow($query, $bindings=[], $arr_type=PDO::FETCH_ASSOC)
Definition: ChDb.php:20
ChDb\query
query($query, $bindings=[])
Definition: ChDb.php:95
ChDb
Definition: ChDb.php:11
$s
$s
Definition: embed.php:13
ChDb\escape
escape($s)
Definition: ChDb.php:117
ChDb\getColumn
getColumn($query, $bindings=[])
Definition: ChDb.php:42
ChDb\unescape
unescape($s)
Definition: ChDb.php:122
ChWsbDb\getInstance
static getInstance()
Definition: ChWsbDb.php:82