MIOLO20
Carregando...
Procurando...
Nenhuma entrada encontrada
mconnection.class
Ir para a documentação deste ficheiro.
1
<?php
2
3
class
ODBCConnection
extends
MConnection
4
{
5
function
__construct
($conf)
6
{
7
parent::__construct($conf);
8
}
9
10
function
_connect
($dbhost, $LoginDB, $LoginUID, $LoginPWD, $persistent =
true
)
11
{
12
if
($persistent)
13
{
14
$this->
id
= odbc_pconnect($dbhost,$LoginDB, $LoginUID);
15
}
16
else
17
{
18
$this->
id
= odbc_connect($dbhost,$LoginDB, $LoginUID);
19
}
20
}
21
22
function
_close
()
23
{
24
odbc_close($this->
id
);
25
}
26
27
function
_error
($resource =
null
)
28
{
29
return
(($error = odbc_error($this->
id
)) ? odbc_errormsg($this->
id
) :
false
);
30
}
31
32
function
_execute
($sql)
33
{
34
if
($statement = odbc_prepare($this->
id
, $sql))
35
{
36
if
($success = odbc_execute($statement))
37
{
38
$this->affectedrows = odbc_num_rows($statement);
39
odbc_free_result($statement);
40
}
41
else
42
{
43
$this->traceback[] = $this->
_error
($statement);
44
}
45
}
46
else
47
{
48
$this->traceback[] = $this->
_error
();
49
}
50
51
return
$success;
52
}
53
54
function
_createquery
()
55
{
56
return
new
ODBCQuery
();
57
}
58
59
function
_chartotimestamp
($timestamp)
60
{
61
return
$timestamp;
62
}
63
64
function
_chartodate
($date)
65
{
66
return
$date;
67
}
68
69
function
_timestamptochar
($timestamp)
70
{
71
return
$timestamp;
72
}
73
74
function
_datetochar
($date)
75
{
76
return
$date;
77
}
78
}
79
?>
MConnection
Definição
mconnection.class:4
MConnection\_error
_error()
Definição
mconnection.class:33
ODBCConnection
Definição
mconnection.class:4
ODBCConnection\_timestamptochar
_timestamptochar($timestamp)
Definição
mconnection.class:69
ODBCConnection\_execute
_execute($sql)
Definição
mconnection.class:32
ODBCConnection\_datetochar
_datetochar($date)
Definição
mconnection.class:74
ODBCConnection\_error
_error($resource=null)
Definição
mconnection.class:27
ODBCConnection\_close
_close()
Definição
mconnection.class:22
ODBCConnection\_connect
_connect($dbhost, $LoginDB, $LoginUID, $LoginPWD, $persistent=true)
Definição
mconnection.class:10
ODBCConnection\_chartodate
_chartodate($date)
Definição
mconnection.class:64
ODBCConnection\_createquery
_createquery()
Definição
mconnection.class:54
ODBCConnection\_chartotimestamp
_chartotimestamp($timestamp)
Definição
mconnection.class:59
ODBCConnection\__construct
__construct($conf)
Definição
mconnection.class:5
ODBCQuery
Definição
mquery.class:4
classes
database
odbc
mconnection.class
Gerado por
1.10.0