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