MIOLO20
Toggle main menu visibility
Página principal
Estruturas de dados
Estruturas de dados
Hierarquia de classes
Campos de dados
Tudo
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Funções
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Variáveis
$
a
b
c
d
e
f
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Ficheiros
Lista de ficheiros
Globais
Tudo
$
_
a
c
d
e
f
g
i
l
m
o
p
r
s
u
Funções
Variáveis
$
_
c
e
f
l
m
o
p
s
Exemplos
▼
MIOLO20
►
Estruturas de dados
▼
Ficheiros
▼
Lista de ficheiros
▼
classes
►
contrib
▼
database
►
firebird
►
mssql
▼
mysql
►
mconnection.class
►
midgenerator.class
►
mquery.class
►
msqljoin.class
►
mtransaction.class
►
odbc
►
oracle8
►
postgres
►
sqlite
►
mconnection.class
►
mdatabase.class
►
mdataset.class
►
mdbal.class
►
midgenerator.class
►
misr.class
►
mquery.class
►
mschema.class
►
msql.class
►
msqljoin.class
►
mtransaction.class
►
doc
►
extensions
►
ezpdf
►
flow
►
interfaces
►
model
►
persistence
►
pslib
►
security
►
services
►
tests
►
ui
►
utils
►
compatibility.class
►
miolo.class
►
Globais
►
Exemplos
•
Tudo
Estruturas de dados
Namespaces
Ficheiros
Funções
Variáveis
Carregando...
Procurando...
Nenhuma entrada encontrada
mconnection.class
Ir para a documentação deste ficheiro.
1
<?php
6
class
MysqlConnection
extends
MConnection
7
{
17
function
__construct
($conf)
18
{
19
parent::__construct($conf);
20
}
17
function
__construct
($conf) {
…
}
21
35
function
_connect
($dbhost, $LoginDB, $LoginUID, $LoginPWD, $persistent =
true
, $port=
''
)
36
{
37
$this->
id
= mysqli_connect($dbhost, $LoginUID, $LoginPWD, $LoginDB, $port);
38
mysqli_select_db($this->
id
, $LoginDB);
39
}
35
function
_connect
($dbhost, $LoginDB, $LoginUID, $LoginPWD, $persistent =
true
, $port=
''
) {
…
}
40
48
function
_close
()
49
{
50
mysqli_close($this->
id
);
51
}
48
function
_close
() {
…
}
52
60
function
_begintransaction
()
61
{
62
$this->
_execute
(
"begin transaction"
);
63
}
60
function
_begintransaction
() {
…
}
64
72
function
_commit
()
73
{
74
$this->
_execute
(
"commit"
);
75
}
72
function
_commit
() {
…
}
76
84
function
_rollback
()
85
{
86
$this->
_execute
(
"rollback"
);
87
}
84
function
_rollback
() {
…
}
88
96
function
_error
()
97
{
98
return
mysqli_error($this->
id
);
99
}
96
function
_error
() {
…
}
100
110
function
_execute
($sql)
111
{
112
$rs = mysqli_query($this->
id
, $sql);
113
$success =
false
;
114
115
if
($rs)
116
{
117
$success =
true
;
118
mysqli_free_result ($rs);
119
}
120
else
121
{
122
$this->traceback[] = $this->
GetError
();
123
}
124
125
return
$success;
126
}
110
function
_execute
($sql) {
…
}
127
135
function
_createquery
()
136
{
137
return
new
MysqlQuery
();
138
}
135
function
_createquery
() {
…
}
139
149
function
_chartotimestamp
($timestamp)
150
{
151
return
" TO_DATE("
. $timestamp .
",'DD/MM/YYYY HH24:MI:SS') "
;
152
}
149
function
_chartotimestamp
($timestamp) {
…
}
153
163
function
_chartodate
($date)
164
{
165
return
" TO_DATE("
. $date .
",'DD/MM/YYYY') "
;
166
}
163
function
_chartodate
($date) {
…
}
167
177
function
_timestamptochar
($timestamp)
178
{
179
return
" TO_CHAR("
. $timestamp .
",'DD/MM/YYYY HH24:MI:SS') "
;
180
}
177
function
_timestamptochar
($timestamp) {
…
}
181
191
function
_datetochar
($date)
192
{
193
return
" TO_CHAR("
. $date .
",'DD/MM/YYYY') "
;
194
}
191
function
_datetochar
($date) {
…
}
195
208
function
_sqljoin
(&$sql, $table1, $table2, $cond)
209
{
210
if
($sql->join)
211
{
212
$sql->join =
"($sql->join INNER JOIN $table2 ON ($cond))"
;
213
}
214
else
215
{
216
$sql->join =
"($table1 INNER JOIN $table2 ON ($cond))"
;
217
}
218
}
208
function
_sqljoin
(&$sql, $table1, $table2, $cond) {
…
}
219
232
function
_sqlleftjoin
(&$sql, $table1, $table2, $cond)
233
{
234
if
($sql->join)
235
{
236
$sql->join =
"($sql->join LEFT JOIN $table2 ON ($cond))"
;
237
}
238
else
239
{
240
$sql->join =
"($table1 LEFT JOIN $table2 ON ($cond))"
;
241
}
242
}
232
function
_sqlleftjoin
(&$sql, $table1, $table2, $cond) {
…
}
243
256
function
_sqlrightjoin
(&$sql, $table1, $table2, $cond)
257
{
258
if
($sql->join)
259
{
260
$sql->join =
"($sql->join RIGHT JOIN $table2 ON ($cond))"
;
261
}
262
else
263
{
264
$sql->join =
"($table1 RIGHT JOIN $table2 ON ($cond))"
;
265
}
266
}
256
function
_sqlrightjoin
(&$sql, $table1, $table2, $cond) {
…
}
267
}
6
class
MysqlConnection
extends
MConnection
{
…
};
268
?>
MConnection
Definição
mconnection.class:4
MConnection\GetError
GetError()
Definição
mconnection.class:89
MysqlConnection
Definição
mconnection.class:7
MysqlConnection\_timestamptochar
_timestamptochar($timestamp)
Definição
mconnection.class:177
MysqlConnection\_rollback
_rollback()
Definição
mconnection.class:84
MysqlConnection\_execute
_execute($sql)
Definição
mconnection.class:110
MysqlConnection\_datetochar
_datetochar($date)
Definição
mconnection.class:191
MysqlConnection\_begintransaction
_begintransaction()
Definição
mconnection.class:60
MysqlConnection\_close
_close()
Definição
mconnection.class:48
MysqlConnection\_sqlleftjoin
_sqlleftjoin(&$sql, $table1, $table2, $cond)
Definição
mconnection.class:232
MysqlConnection\_commit
_commit()
Definição
mconnection.class:72
MysqlConnection\_error
_error()
Definição
mconnection.class:96
MysqlConnection\_sqlrightjoin
_sqlrightjoin(&$sql, $table1, $table2, $cond)
Definição
mconnection.class:256
MysqlConnection\_connect
_connect($dbhost, $LoginDB, $LoginUID, $LoginPWD, $persistent=true, $port='')
Definição
mconnection.class:35
MysqlConnection\_chartodate
_chartodate($date)
Definição
mconnection.class:163
MysqlConnection\_sqljoin
_sqljoin(&$sql, $table1, $table2, $cond)
Definição
mconnection.class:208
MysqlConnection\_createquery
_createquery()
Definição
mconnection.class:135
MysqlConnection\_chartotimestamp
_chartotimestamp($timestamp)
Definição
mconnection.class:149
MysqlConnection\__construct
__construct($conf)
Definição
mconnection.class:17
MysqlQuery
Definição
mquery.class:7
classes
database
mysql
mconnection.class
Gerado por
1.10.0