MIOLO20
Carregando...
Procurando...
Nenhuma entrada encontrada
mconnection.class
Ir para a documentação deste ficheiro.
1<?php
2
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?>
_timestamptochar($timestamp)
_error($resource=null)
_connect($dbhost, $LoginDB, $LoginUID, $LoginPWD, $persistent=true)
_chartotimestamp($timestamp)
__construct($conf)