MIOLO20
Carregando...
Procurando...
Nenhuma entrada encontrada
mconnection.class
Ir para a documentação deste ficheiro.
1
<?php
6
class
FirebirdConnection
extends
MConnection
7
{
17
function
__construct
($conf)
18
{
19
parent::__construct($conf);
20
}
21
36
function
_connect
($dbhost, $LoginDB, $LoginUID, $LoginPWD, $persistent =
true
, $parameters =
null
)
37
{
38
$buffers = (isset($parameters[
'buffers'
])) ? ($parameters[
'buffers'
]) : (
null
);
39
$characterset = (isset($parameters[
'characterset'
])) ? ($parameters[
'characterset'
]) : (
null
);
40
$dialect = (isset($parameters[
'dialect'
])) ? ($parameters[
'dialect'
]) : (
null
);
41
$role = (isset($parameters[
'role'
])) ? ($parameters[
'role'
]) : (
null
);
42
43
if
(
false
&& $persistent)
44
{
45
$this->
id
= ibase_pconnect($LoginDB, $LoginUID, $LoginPWD, $characterset, $buffers, $dialect, $role);
46
}
47
else
48
{
49
$this->
id
= ibase_connect($LoginDB, $LoginUID, $LoginPWD, $characterset, $buffers, $dialect, $role);
50
}
51
}
52
60
function
_close
()
61
{
62
ibase_close ($this->
id
);
63
}
64
74
function
_error
($resource =
null
)
75
{
76
return
ibase_errmsg();
77
}
78
88
function
_parse
(&$sql)
89
{
90
$sql = preg_replace(
"/:((.+) /"
,
"\?"
, $sql);
91
$statement = ibase_prepare($this->
id
, $sql);
92
return
$statement;
93
}
94
106
function
_bind
($stmt, $ph, $pv)
107
{
108
}
109
119
function
_execute
($sql)
120
{
121
$prepared = ibase_prepare($this->
id
, $sql);
122
123
if
($prepared)
124
{
125
$rs = ibase_execute($prepared);
126
$success =
false
;
127
128
if
($rs)
129
{
130
$success =
true
;
131
$this->affectedrows = ibase_affected_rows($this->
id
);
132
ibase_free_result ($rs);
133
}
134
else
135
{
136
$this->traceback[] = $this->
_error
($this->
id
);
137
}
138
}
139
else
140
{
141
$this->traceback[] = $this->
_error
($this->
id
);
142
}
143
144
return
$success;
145
}
146
154
function
_createquery
()
155
{
156
return
new
FirebirdQuery
();
157
}
158
168
function
_chartotimestamp
($timestamp)
169
{
170
return
"'"
. substr($timestamp, 7, 4) .
'/'
. substr($timestamp, 4, 2) .
'/'
. substr($timestamp, 1, 2) .
' '
. substr($timestamp, 11);
171
}
172
182
function
_chartodate
($date)
183
{
184
return
$date;
185
}
186
196
function
_timestamptochar
($timestamp)
197
{
198
return
$timestamp;
199
}
200
210
function
_datetochar
($date)
211
{
212
return
$date;
213
}
214
}
215
?>
FirebirdConnection
Definição
mconnection.class:7
FirebirdConnection\_bind
_bind($stmt, $ph, $pv)
Definição
mconnection.class:106
FirebirdConnection\_timestamptochar
_timestamptochar($timestamp)
Definição
mconnection.class:196
FirebirdConnection\_connect
_connect($dbhost, $LoginDB, $LoginUID, $LoginPWD, $persistent=true, $parameters=null)
Definição
mconnection.class:36
FirebirdConnection\_parse
_parse(&$sql)
Definição
mconnection.class:88
FirebirdConnection\_execute
_execute($sql)
Definição
mconnection.class:119
FirebirdConnection\_datetochar
_datetochar($date)
Definição
mconnection.class:210
FirebirdConnection\_error
_error($resource=null)
Definição
mconnection.class:74
FirebirdConnection\_close
_close()
Definição
mconnection.class:60
FirebirdConnection\_chartodate
_chartodate($date)
Definição
mconnection.class:182
FirebirdConnection\_createquery
_createquery()
Definição
mconnection.class:154
FirebirdConnection\_chartotimestamp
_chartotimestamp($timestamp)
Definição
mconnection.class:168
FirebirdConnection\__construct
__construct($conf)
Definição
mconnection.class:17
FirebirdQuery
Definição
mquery.class:7
MConnection
Definição
mconnection.class:4
MConnection\_error
_error()
Definição
mconnection.class:33
classes
database
firebird
mconnection.class
Gerado por
1.10.0