Cheetah
flash
modules
global
inc
db.inc.php
Go to the documentation of this file.
1
<?
php
2
11
class
ChDbConnect
12
{
13
function
getResult
($sQuery)
14
{
15
return
ChWsbDb::getInstance
()->res($sQuery);
16
}
17
18
function
getArray
($sQuery)
19
{
20
return
ChWsbDb::getInstance
()->getRow($sQuery);
21
}
22
23
function
getValue
($sQuery)
24
{
25
return
ChWsbDb::getInstance
()->getOne($sQuery);
26
}
27
28
function
getLastInsertId
()
29
{
30
return
ChWsbDb::getInstance
()->lastId();
31
}
32
33
function
escape
(
$s
)
34
{
35
return
ChWsbDb::getInstance
()->escape(
$s
,
false
);
36
}
37
}
38
39
global
$oDb
;
40
$oDb
=
new
ChDbConnect
();
41
42
/*
43
* Interface functions are needed to simplify the useing of ChDbConnect class.
44
*/
45
function
getResult
($sQuery)
46
{
47
global
$oDb
;
48
49
return
$oDb
->getResult($sQuery);
50
}
51
52
function
getArray
($sQuery)
53
{
54
global
$oDb
;
55
56
return
$oDb
->getArray($sQuery);
57
}
58
59
function
getValue
($sQuery)
60
{
61
global
$oDb
;
62
63
return
$oDb
->getValue($sQuery);
64
}
65
66
function
getLastInsertId
()
67
{
68
global
$oDb
;
69
70
return
$oDb
->getLastInsertId();
71
}
72
73
function
getEscapedValue
($sValue)
74
{
75
global
$oDb
;
76
77
return
$oDb
->escape($sValue);
78
}
getLastInsertId
getLastInsertId()
Definition:
db.inc.php:66
ChDbConnect\escape
escape($s)
Definition:
db.inc.php:33
php
getValue
getValue($sQuery)
Definition:
db.inc.php:59
ChDbConnect
Definition:
db.inc.php:12
$oDb
global $oDb
Definition:
db.inc.php:39
global
if(!defined("GLOBAL_MODULE")) define("GLOBAL_MODULE" global
Definition:
header.inc.php:25
ChDbConnect\getResult
getResult($sQuery)
Definition:
db.inc.php:13
$s
$s
Definition:
embed.php:13
ChDbConnect\getValue
getValue($sQuery)
Definition:
db.inc.php:23
getEscapedValue
getEscapedValue($sValue)
Definition:
db.inc.php:73
getArray
getArray($sQuery)
Definition:
db.inc.php:52
ChWsbDb\getInstance
static getInstance()
Definition:
ChWsbDb.php:82
ChDbConnect\getArray
getArray($sQuery)
Definition:
db.inc.php:18
ChDbConnect\getLastInsertId
getLastInsertId()
Definition:
db.inc.php:28
getResult
getResult($sQuery)
Definition:
db.inc.php:45
Generated by
1.8.20