@@ -84,8 +84,8 @@ discard block |
||
84 | 84 | |
85 | 85 | function _affectedrows() |
86 | 86 | { |
87 | - return sqlite_changes($this->_connectionID); |
|
88 | - } |
|
87 | + return sqlite_changes($this->_connectionID); |
|
88 | + } |
|
89 | 89 | |
90 | 90 | function ErrorMsg() |
91 | 91 | { |
@@ -240,46 +240,46 @@ discard block |
||
240 | 240 | { |
241 | 241 | $false = false; |
242 | 242 | // save old fetch mode |
243 | - global $ADODB_FETCH_MODE; |
|
244 | - $save = $ADODB_FETCH_MODE; |
|
245 | - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; |
|
246 | - if ($this->fetchMode !== FALSE) { |
|
247 | - $savem = $this->SetFetchMode(FALSE); |
|
248 | - } |
|
243 | + global $ADODB_FETCH_MODE; |
|
244 | + $save = $ADODB_FETCH_MODE; |
|
245 | + $ADODB_FETCH_MODE = ADODB_FETCH_NUM; |
|
246 | + if ($this->fetchMode !== FALSE) { |
|
247 | + $savem = $this->SetFetchMode(FALSE); |
|
248 | + } |
|
249 | 249 | $SQL=sprintf("SELECT name,sql FROM sqlite_master WHERE type='index' AND tbl_name='%s'", strtolower($table)); |
250 | - $rs = $this->Execute($SQL); |
|
251 | - if (!is_object($rs)) { |
|
250 | + $rs = $this->Execute($SQL); |
|
251 | + if (!is_object($rs)) { |
|
252 | 252 | if (isset($savem)) |
253 | 253 | $this->SetFetchMode($savem); |
254 | 254 | $ADODB_FETCH_MODE = $save; |
255 | - return $false; |
|
256 | - } |
|
255 | + return $false; |
|
256 | + } |
|
257 | 257 | |
258 | 258 | $indexes = array (); |
259 | 259 | while ($row = $rs->FetchRow()) { |
260 | 260 | if ($primary && preg_match("/primary/i",$row[1]) == 0) continue; |
261 | - if (!isset($indexes[$row[0]])) { |
|
261 | + if (!isset($indexes[$row[0]])) { |
|
262 | 262 | |
263 | 263 | $indexes[$row[0]] = array( |
264 | 264 | 'unique' => preg_match("/unique/i",$row[1]), |
265 | 265 | 'columns' => array()); |
266 | 266 | } |
267 | 267 | /** |
268 | - * There must be a more elegant way of doing this, |
|
269 | - * the index elements appear in the SQL statement |
|
270 | - * in cols[1] between parentheses |
|
271 | - * e.g CREATE UNIQUE INDEX ware_0 ON warehouse (org,warehouse) |
|
272 | - */ |
|
268 | + * There must be a more elegant way of doing this, |
|
269 | + * the index elements appear in the SQL statement |
|
270 | + * in cols[1] between parentheses |
|
271 | + * e.g CREATE UNIQUE INDEX ware_0 ON warehouse (org,warehouse) |
|
272 | + */ |
|
273 | 273 | $cols = explode("(",$row[1]); |
274 | 274 | $cols = explode(")",$cols[1]); |
275 | 275 | array_pop($cols); |
276 | 276 | $indexes[$row[0]]['columns'] = $cols; |
277 | 277 | } |
278 | 278 | if (isset($savem)) { |
279 | - $this->SetFetchMode($savem); |
|
279 | + $this->SetFetchMode($savem); |
|
280 | 280 | $ADODB_FETCH_MODE = $save; |
281 | 281 | } |
282 | - return $indexes; |
|
282 | + return $indexes; |
|
283 | 283 | } |
284 | 284 | |
285 | 285 | } |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | |
27 | 27 | function ADODB_sqlitepo() |
28 | 28 | { |
29 | - $this->ADODB_sqlite(); |
|
29 | + $this->ADODB_sqlite(); |
|
30 | 30 | } |
31 | 31 | } |
32 | 32 | |
@@ -40,23 +40,23 @@ discard block |
||
40 | 40 | |
41 | 41 | function ADORecordset_sqlitepo($queryID,$mode=false) |
42 | 42 | { |
43 | - $this->ADORecordset_sqlite($queryID,$mode); |
|
43 | + $this->ADORecordset_sqlite($queryID,$mode); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | // Modified to strip table names from returned fields |
47 | 47 | function _fetch($ignore_fields=false) |
48 | 48 | { |
49 | - $this->fields = array(); |
|
50 | - $fields = @sqlite_fetch_array($this->_queryID,$this->fetchMode); |
|
51 | - if(is_array($fields)) |
|
52 | - foreach($fields as $n => $v) |
|
53 | - { |
|
54 | - if(($p = strpos($n, ".")) !== false) |
|
55 | - $n = substr($n, $p+1); |
|
56 | - $this->fields[$n] = $v; |
|
57 | - } |
|
58 | - |
|
59 | - return !empty($this->fields); |
|
49 | + $this->fields = array(); |
|
50 | + $fields = @sqlite_fetch_array($this->_queryID,$this->fetchMode); |
|
51 | + if(is_array($fields)) |
|
52 | + foreach($fields as $n => $v) |
|
53 | + { |
|
54 | + if(($p = strpos($n, ".")) !== false) |
|
55 | + $n = substr($n, $p+1); |
|
56 | + $this->fields[$n] = $v; |
|
57 | + } |
|
58 | + |
|
59 | + return !empty($this->fields); |
|
60 | 60 | } |
61 | 61 | } |
62 | 62 | ?> |
63 | 63 | \ No newline at end of file |
@@ -189,55 +189,55 @@ discard block |
||
189 | 189 | |
190 | 190 | function &MetaIndexes ($table, $primary = FALSE, $owner=false) |
191 | 191 | { |
192 | - // save old fetch mode |
|
193 | - global $ADODB_FETCH_MODE; |
|
194 | - $false = false; |
|
195 | - $save = $ADODB_FETCH_MODE; |
|
196 | - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; |
|
197 | - if ($this->fetchMode !== FALSE) { |
|
198 | - $savem = $this->SetFetchMode(FALSE); |
|
199 | - } |
|
200 | - $table = strtoupper($table); |
|
201 | - $sql = "SELECT * FROM RDB\$INDICES WHERE RDB\$RELATION_NAME = '".$table."'"; |
|
202 | - if (!$primary) { |
|
203 | - $sql .= " AND RDB\$INDEX_NAME NOT LIKE 'RDB\$%'"; |
|
204 | - } else { |
|
205 | - $sql .= " AND RDB\$INDEX_NAME NOT LIKE 'RDB\$FOREIGN%'"; |
|
206 | - } |
|
207 | - // get index details |
|
208 | - $rs = $this->Execute($sql); |
|
209 | - if (!is_object($rs)) { |
|
210 | - // restore fetchmode |
|
211 | - if (isset($savem)) { |
|
212 | - $this->SetFetchMode($savem); |
|
213 | - } |
|
214 | - $ADODB_FETCH_MODE = $save; |
|
215 | - return $false; |
|
216 | - } |
|
192 | + // save old fetch mode |
|
193 | + global $ADODB_FETCH_MODE; |
|
194 | + $false = false; |
|
195 | + $save = $ADODB_FETCH_MODE; |
|
196 | + $ADODB_FETCH_MODE = ADODB_FETCH_NUM; |
|
197 | + if ($this->fetchMode !== FALSE) { |
|
198 | + $savem = $this->SetFetchMode(FALSE); |
|
199 | + } |
|
200 | + $table = strtoupper($table); |
|
201 | + $sql = "SELECT * FROM RDB\$INDICES WHERE RDB\$RELATION_NAME = '".$table."'"; |
|
202 | + if (!$primary) { |
|
203 | + $sql .= " AND RDB\$INDEX_NAME NOT LIKE 'RDB\$%'"; |
|
204 | + } else { |
|
205 | + $sql .= " AND RDB\$INDEX_NAME NOT LIKE 'RDB\$FOREIGN%'"; |
|
206 | + } |
|
207 | + // get index details |
|
208 | + $rs = $this->Execute($sql); |
|
209 | + if (!is_object($rs)) { |
|
210 | + // restore fetchmode |
|
211 | + if (isset($savem)) { |
|
212 | + $this->SetFetchMode($savem); |
|
213 | + } |
|
214 | + $ADODB_FETCH_MODE = $save; |
|
215 | + return $false; |
|
216 | + } |
|
217 | 217 | |
218 | - $indexes = array (); |
|
218 | + $indexes = array (); |
|
219 | 219 | while ($row = $rs->FetchRow()) { |
220 | 220 | $index = $row[0]; |
221 | - if (!isset($indexes[$index])) { |
|
222 | - if (is_null($row[3])) {$row[3] = 0;} |
|
223 | - $indexes[$index] = array( |
|
224 | - 'unique' => ($row[3] == 1), |
|
225 | - 'columns' => array() |
|
226 | - ); |
|
227 | - } |
|
221 | + if (!isset($indexes[$index])) { |
|
222 | + if (is_null($row[3])) {$row[3] = 0;} |
|
223 | + $indexes[$index] = array( |
|
224 | + 'unique' => ($row[3] == 1), |
|
225 | + 'columns' => array() |
|
226 | + ); |
|
227 | + } |
|
228 | 228 | $sql = "SELECT * FROM RDB\$INDEX_SEGMENTS WHERE RDB\$INDEX_NAME = '".$name."' ORDER BY RDB\$FIELD_POSITION ASC"; |
229 | 229 | $rs1 = $this->Execute($sql); |
230 | - while ($row1 = $rs1->FetchRow()) { |
|
231 | - $indexes[$index]['columns'][$row1[2]] = $row1[1]; |
|
232 | - } |
|
230 | + while ($row1 = $rs1->FetchRow()) { |
|
231 | + $indexes[$index]['columns'][$row1[2]] = $row1[1]; |
|
232 | + } |
|
233 | + } |
|
234 | + // restore fetchmode |
|
235 | + if (isset($savem)) { |
|
236 | + $this->SetFetchMode($savem); |
|
233 | 237 | } |
234 | - // restore fetchmode |
|
235 | - if (isset($savem)) { |
|
236 | - $this->SetFetchMode($savem); |
|
237 | - } |
|
238 | - $ADODB_FETCH_MODE = $save; |
|
238 | + $ADODB_FETCH_MODE = $save; |
|
239 | 239 | |
240 | - return $indexes; |
|
240 | + return $indexes; |
|
241 | 241 | } |
242 | 242 | |
243 | 243 | |
@@ -388,24 +388,24 @@ discard block |
||
388 | 388 | case 7: |
389 | 389 | case 8: |
390 | 390 | if ($dialect3) { |
391 | - switch($fsubtype){ |
|
392 | - case 0: |
|
393 | - $fld->type = ($ftype == 7 ? 'smallint' : 'integer'); |
|
394 | - break; |
|
395 | - case 1: |
|
396 | - $fld->type = 'numeric'; |
|
391 | + switch($fsubtype){ |
|
392 | + case 0: |
|
393 | + $fld->type = ($ftype == 7 ? 'smallint' : 'integer'); |
|
394 | + break; |
|
395 | + case 1: |
|
396 | + $fld->type = 'numeric'; |
|
397 | 397 | $fld->max_length = $fprecision; |
398 | 398 | $fld->scale = $fscale; |
399 | - break; |
|
400 | - case 2: |
|
401 | - $fld->type = 'decimal'; |
|
399 | + break; |
|
400 | + case 2: |
|
401 | + $fld->type = 'decimal'; |
|
402 | 402 | $fld->max_length = $fprecision; |
403 | 403 | $fld->scale = $fscale; |
404 | - break; |
|
405 | - } // switch |
|
404 | + break; |
|
405 | + } // switch |
|
406 | 406 | } else { |
407 | 407 | if ($fscale !=0) { |
408 | - $fld->type = 'decimal'; |
|
408 | + $fld->type = 'decimal'; |
|
409 | 409 | $fld->scale = $fscale; |
410 | 410 | $fld->max_length = ($ftype == 7 ? 4 : 9); |
411 | 411 | } else { |
@@ -415,23 +415,23 @@ discard block |
||
415 | 415 | break; |
416 | 416 | case 16: |
417 | 417 | if ($dialect3) { |
418 | - switch($fsubtype){ |
|
419 | - case 0: |
|
420 | - $fld->type = 'decimal'; |
|
418 | + switch($fsubtype){ |
|
419 | + case 0: |
|
420 | + $fld->type = 'decimal'; |
|
421 | 421 | $fld->max_length = 18; |
422 | 422 | $fld->scale = 0; |
423 | - break; |
|
424 | - case 1: |
|
425 | - $fld->type = 'numeric'; |
|
423 | + break; |
|
424 | + case 1: |
|
425 | + $fld->type = 'numeric'; |
|
426 | 426 | $fld->max_length = $fprecision; |
427 | 427 | $fld->scale = $fscale; |
428 | - break; |
|
429 | - case 2: |
|
430 | - $fld->type = 'decimal'; |
|
428 | + break; |
|
429 | + case 2: |
|
430 | + $fld->type = 'decimal'; |
|
431 | 431 | $fld->max_length = $fprecision; |
432 | 432 | $fld->scale = $fscale; |
433 | - break; |
|
434 | - } // switch |
|
433 | + break; |
|
434 | + } // switch |
|
435 | 435 | } |
436 | 436 | break; |
437 | 437 | case 10: |
@@ -442,7 +442,7 @@ discard block |
||
442 | 442 | break; |
443 | 443 | case 27: |
444 | 444 | if ($fscale !=0) { |
445 | - $fld->type = 'decimal'; |
|
445 | + $fld->type = 'decimal'; |
|
446 | 446 | $fld->max_length = 15; |
447 | 447 | $fld->scale = 5; |
448 | 448 | } else { |
@@ -451,7 +451,7 @@ discard block |
||
451 | 451 | break; |
452 | 452 | case 35: |
453 | 453 | if ($dialect3) { |
454 | - $fld->type = 'timestamp'; |
|
454 | + $fld->type = 'timestamp'; |
|
455 | 455 | } else { |
456 | 456 | $fld->type = 'date'; |
457 | 457 | } |
@@ -24,16 +24,16 @@ discard block |
||
24 | 24 | } |
25 | 25 | |
26 | 26 | class ADODB_ldap extends ADOConnection { |
27 | - var $databaseType = 'ldap'; |
|
27 | + var $databaseType = 'ldap'; |
|
28 | 28 | var $dataProvider = 'ldap'; |
29 | 29 | |
30 | 30 | # Connection information |
31 | - var $username = false; |
|
32 | - var $password = false; |
|
31 | + var $username = false; |
|
32 | + var $password = false; |
|
33 | 33 | |
34 | - # Used during searches |
|
35 | - var $filter; |
|
36 | - var $dn; |
|
34 | + # Used during searches |
|
35 | + var $filter; |
|
36 | + var $dn; |
|
37 | 37 | var $version; |
38 | 38 | var $port = 389; |
39 | 39 | |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | $conn_info = array( $host,$this->port); |
56 | 56 | |
57 | 57 | if ( strstr( $host, ':' ) ) { |
58 | - $conn_info = split( ':', $host ); |
|
58 | + $conn_info = split( ':', $host ); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | $this->_connectionID = ldap_connect( $conn_info[0], $conn_info[1] ); |
@@ -70,10 +70,10 @@ discard block |
||
70 | 70 | } |
71 | 71 | |
72 | 72 | if ($username) { |
73 | - $bind = ldap_bind( $this->_connectionID, $username, $password ); |
|
73 | + $bind = ldap_bind( $this->_connectionID, $username, $password ); |
|
74 | 74 | } else { |
75 | 75 | $username = 'anonymous'; |
76 | - $bind = ldap_bind( $this->_connectionID ); |
|
76 | + $bind = ldap_bind( $this->_connectionID ); |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | if (!$bind) { |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | return $rs; |
155 | 155 | } |
156 | 156 | |
157 | - /* closes the LDAP connection */ |
|
157 | + /* closes the LDAP connection */ |
|
158 | 158 | function _close() |
159 | 159 | { |
160 | 160 | @ldap_close( $this->_connectionID ); |
@@ -166,11 +166,11 @@ discard block |
||
166 | 166 | return true; |
167 | 167 | } // SelectDB |
168 | 168 | |
169 | - function ServerInfo() |
|
170 | - { |
|
171 | - if( !empty( $this->version ) ) return $this->version; |
|
172 | - $version = array(); |
|
173 | - /* |
|
169 | + function ServerInfo() |
|
170 | + { |
|
171 | + if( !empty( $this->version ) ) return $this->version; |
|
172 | + $version = array(); |
|
173 | + /* |
|
174 | 174 | Determines how aliases are handled during search. |
175 | 175 | LDAP_DEREF_NEVER (0x00) |
176 | 176 | LDAP_DEREF_SEARCHING (0x01) |
@@ -181,86 +181,86 @@ discard block |
||
181 | 181 | aliases are dereferenced when locating the base object but not during the search. |
182 | 182 | Default: LDAP_DEREF_NEVER |
183 | 183 | */ |
184 | - ldap_get_option( $this->_connectionID, LDAP_OPT_DEREF, $version['LDAP_OPT_DEREF'] ) ; |
|
185 | - switch ( $version['LDAP_OPT_DEREF'] ) { |
|
186 | - case 0: |
|
187 | - $version['LDAP_OPT_DEREF'] = 'LDAP_DEREF_NEVER'; |
|
188 | - case 1: |
|
189 | - $version['LDAP_OPT_DEREF'] = 'LDAP_DEREF_SEARCHING'; |
|
190 | - case 2: |
|
191 | - $version['LDAP_OPT_DEREF'] = 'LDAP_DEREF_FINDING'; |
|
192 | - case 3: |
|
193 | - $version['LDAP_OPT_DEREF'] = 'LDAP_DEREF_ALWAYS'; |
|
194 | - } |
|
184 | + ldap_get_option( $this->_connectionID, LDAP_OPT_DEREF, $version['LDAP_OPT_DEREF'] ) ; |
|
185 | + switch ( $version['LDAP_OPT_DEREF'] ) { |
|
186 | + case 0: |
|
187 | + $version['LDAP_OPT_DEREF'] = 'LDAP_DEREF_NEVER'; |
|
188 | + case 1: |
|
189 | + $version['LDAP_OPT_DEREF'] = 'LDAP_DEREF_SEARCHING'; |
|
190 | + case 2: |
|
191 | + $version['LDAP_OPT_DEREF'] = 'LDAP_DEREF_FINDING'; |
|
192 | + case 3: |
|
193 | + $version['LDAP_OPT_DEREF'] = 'LDAP_DEREF_ALWAYS'; |
|
194 | + } |
|
195 | 195 | |
196 | - /* |
|
196 | + /* |
|
197 | 197 | A limit on the number of entries to return from a search. |
198 | 198 | LDAP_NO_LIMIT (0) means no limit. |
199 | 199 | Default: LDAP_NO_LIMIT |
200 | 200 | */ |
201 | - ldap_get_option( $this->_connectionID, LDAP_OPT_SIZELIMIT, $version['LDAP_OPT_SIZELIMIT'] ); |
|
202 | - if ( $version['LDAP_OPT_SIZELIMIT'] == 0 ) { |
|
203 | - $version['LDAP_OPT_SIZELIMIT'] = 'LDAP_NO_LIMIT'; |
|
204 | - } |
|
201 | + ldap_get_option( $this->_connectionID, LDAP_OPT_SIZELIMIT, $version['LDAP_OPT_SIZELIMIT'] ); |
|
202 | + if ( $version['LDAP_OPT_SIZELIMIT'] == 0 ) { |
|
203 | + $version['LDAP_OPT_SIZELIMIT'] = 'LDAP_NO_LIMIT'; |
|
204 | + } |
|
205 | 205 | |
206 | - /* |
|
206 | + /* |
|
207 | 207 | A limit on the number of seconds to spend on a search. |
208 | 208 | LDAP_NO_LIMIT (0) means no limit. |
209 | 209 | Default: LDAP_NO_LIMIT |
210 | 210 | */ |
211 | - ldap_get_option( $this->_connectionID, LDAP_OPT_TIMELIMIT, $version['LDAP_OPT_TIMELIMIT'] ); |
|
212 | - if ( $version['LDAP_OPT_TIMELIMIT'] == 0 ) { |
|
213 | - $version['LDAP_OPT_TIMELIMIT'] = 'LDAP_NO_LIMIT'; |
|
214 | - } |
|
211 | + ldap_get_option( $this->_connectionID, LDAP_OPT_TIMELIMIT, $version['LDAP_OPT_TIMELIMIT'] ); |
|
212 | + if ( $version['LDAP_OPT_TIMELIMIT'] == 0 ) { |
|
213 | + $version['LDAP_OPT_TIMELIMIT'] = 'LDAP_NO_LIMIT'; |
|
214 | + } |
|
215 | 215 | |
216 | - /* |
|
216 | + /* |
|
217 | 217 | Determines whether the LDAP library automatically follows referrals returned by LDAP servers or not. |
218 | 218 | LDAP_OPT_ON |
219 | 219 | LDAP_OPT_OFF |
220 | 220 | Default: ON |
221 | 221 | */ |
222 | - ldap_get_option( $this->_connectionID, LDAP_OPT_REFERRALS, $version['LDAP_OPT_REFERRALS'] ); |
|
223 | - if ( $version['LDAP_OPT_REFERRALS'] == 0 ) { |
|
224 | - $version['LDAP_OPT_REFERRALS'] = 'LDAP_OPT_OFF'; |
|
225 | - } else { |
|
226 | - $version['LDAP_OPT_REFERRALS'] = 'LDAP_OPT_ON'; |
|
222 | + ldap_get_option( $this->_connectionID, LDAP_OPT_REFERRALS, $version['LDAP_OPT_REFERRALS'] ); |
|
223 | + if ( $version['LDAP_OPT_REFERRALS'] == 0 ) { |
|
224 | + $version['LDAP_OPT_REFERRALS'] = 'LDAP_OPT_OFF'; |
|
225 | + } else { |
|
226 | + $version['LDAP_OPT_REFERRALS'] = 'LDAP_OPT_ON'; |
|
227 | 227 | |
228 | - } |
|
229 | - /* |
|
228 | + } |
|
229 | + /* |
|
230 | 230 | Determines whether LDAP I/O operations are automatically restarted if they abort prematurely. |
231 | 231 | LDAP_OPT_ON |
232 | 232 | LDAP_OPT_OFF |
233 | 233 | Default: OFF |
234 | 234 | */ |
235 | - ldap_get_option( $this->_connectionID, LDAP_OPT_RESTART, $version['LDAP_OPT_RESTART'] ); |
|
236 | - if ( $version['LDAP_OPT_RESTART'] == 0 ) { |
|
237 | - $version['LDAP_OPT_RESTART'] = 'LDAP_OPT_OFF'; |
|
238 | - } else { |
|
239 | - $version['LDAP_OPT_RESTART'] = 'LDAP_OPT_ON'; |
|
235 | + ldap_get_option( $this->_connectionID, LDAP_OPT_RESTART, $version['LDAP_OPT_RESTART'] ); |
|
236 | + if ( $version['LDAP_OPT_RESTART'] == 0 ) { |
|
237 | + $version['LDAP_OPT_RESTART'] = 'LDAP_OPT_OFF'; |
|
238 | + } else { |
|
239 | + $version['LDAP_OPT_RESTART'] = 'LDAP_OPT_ON'; |
|
240 | 240 | |
241 | - } |
|
242 | - /* |
|
241 | + } |
|
242 | + /* |
|
243 | 243 | This option indicates the version of the LDAP protocol used when communicating with the primary LDAP server. |
244 | 244 | LDAP_VERSION2 (2) |
245 | 245 | LDAP_VERSION3 (3) |
246 | 246 | Default: LDAP_VERSION2 (2) |
247 | 247 | */ |
248 | - ldap_get_option( $this->_connectionID, LDAP_OPT_PROTOCOL_VERSION, $version['LDAP_OPT_PROTOCOL_VERSION'] ); |
|
249 | - if ( $version['LDAP_OPT_PROTOCOL_VERSION'] == 2 ) { |
|
250 | - $version['LDAP_OPT_PROTOCOL_VERSION'] = 'LDAP_VERSION2'; |
|
251 | - } else { |
|
252 | - $version['LDAP_OPT_PROTOCOL_VERSION'] = 'LDAP_VERSION3'; |
|
248 | + ldap_get_option( $this->_connectionID, LDAP_OPT_PROTOCOL_VERSION, $version['LDAP_OPT_PROTOCOL_VERSION'] ); |
|
249 | + if ( $version['LDAP_OPT_PROTOCOL_VERSION'] == 2 ) { |
|
250 | + $version['LDAP_OPT_PROTOCOL_VERSION'] = 'LDAP_VERSION2'; |
|
251 | + } else { |
|
252 | + $version['LDAP_OPT_PROTOCOL_VERSION'] = 'LDAP_VERSION3'; |
|
253 | 253 | |
254 | - } |
|
255 | - /* The host name (or list of hosts) for the primary LDAP server. */ |
|
256 | - ldap_get_option( $this->_connectionID, LDAP_OPT_HOST_NAME, $version['LDAP_OPT_HOST_NAME'] ); |
|
257 | - ldap_get_option( $this->_connectionID, LDAP_OPT_ERROR_NUMBER, $version['LDAP_OPT_ERROR_NUMBER'] ); |
|
258 | - ldap_get_option( $this->_connectionID, LDAP_OPT_ERROR_STRING, $version['LDAP_OPT_ERROR_STRING'] ); |
|
259 | - ldap_get_option( $this->_connectionID, LDAP_OPT_MATCHED_DN, $version['LDAP_OPT_MATCHED_DN'] ); |
|
254 | + } |
|
255 | + /* The host name (or list of hosts) for the primary LDAP server. */ |
|
256 | + ldap_get_option( $this->_connectionID, LDAP_OPT_HOST_NAME, $version['LDAP_OPT_HOST_NAME'] ); |
|
257 | + ldap_get_option( $this->_connectionID, LDAP_OPT_ERROR_NUMBER, $version['LDAP_OPT_ERROR_NUMBER'] ); |
|
258 | + ldap_get_option( $this->_connectionID, LDAP_OPT_ERROR_STRING, $version['LDAP_OPT_ERROR_STRING'] ); |
|
259 | + ldap_get_option( $this->_connectionID, LDAP_OPT_MATCHED_DN, $version['LDAP_OPT_MATCHED_DN'] ); |
|
260 | 260 | |
261 | - return $this->version = $version; |
|
261 | + return $this->version = $version; |
|
262 | 262 | |
263 | - } |
|
263 | + } |
|
264 | 264 | } |
265 | 265 | |
266 | 266 | /*-------------------------------------------------------------------------------------- |
@@ -304,97 +304,97 @@ discard block |
||
304 | 304 | It's currently being used in the _fetch() function and the |
305 | 305 | GetAssoc() function |
306 | 306 | */ |
307 | - $this->_numOfRows = ldap_count_entries( $this->connection->_connectionID, $this->_queryID ); |
|
307 | + $this->_numOfRows = ldap_count_entries( $this->connection->_connectionID, $this->_queryID ); |
|
308 | 308 | |
309 | 309 | } |
310 | 310 | |
311 | - /* |
|
311 | + /* |
|
312 | 312 | Return whole recordset as a multi-dimensional associative array |
313 | 313 | */ |
314 | 314 | function &GetAssoc($force_array = false, $first2cols = false) |
315 | 315 | { |
316 | 316 | $records = $this->_numOfRows; |
317 | - $results = array(); |
|
318 | - for ( $i=0; $i < $records; $i++ ) { |
|
319 | - foreach ( $this->fields as $k=>$v ) { |
|
320 | - if ( is_array( $v ) ) { |
|
321 | - if ( $v['count'] == 1 ) { |
|
322 | - $results[$i][$k] = $v[0]; |
|
323 | - } else { |
|
324 | - array_shift( $v ); |
|
325 | - $results[$i][$k] = $v; |
|
326 | - } |
|
327 | - } |
|
328 | - } |
|
329 | - } |
|
317 | + $results = array(); |
|
318 | + for ( $i=0; $i < $records; $i++ ) { |
|
319 | + foreach ( $this->fields as $k=>$v ) { |
|
320 | + if ( is_array( $v ) ) { |
|
321 | + if ( $v['count'] == 1 ) { |
|
322 | + $results[$i][$k] = $v[0]; |
|
323 | + } else { |
|
324 | + array_shift( $v ); |
|
325 | + $results[$i][$k] = $v; |
|
326 | + } |
|
327 | + } |
|
328 | + } |
|
329 | + } |
|
330 | 330 | |
331 | 331 | return $results; |
332 | 332 | } |
333 | 333 | |
334 | - function &GetRowAssoc() |
|
334 | + function &GetRowAssoc() |
|
335 | 335 | { |
336 | - $results = array(); |
|
337 | - foreach ( $this->fields as $k=>$v ) { |
|
338 | - if ( is_array( $v ) ) { |
|
339 | - if ( $v['count'] == 1 ) { |
|
340 | - $results[$k] = $v[0]; |
|
341 | - } else { |
|
342 | - array_shift( $v ); |
|
343 | - $results[$k] = $v; |
|
344 | - } |
|
345 | - } |
|
346 | - } |
|
336 | + $results = array(); |
|
337 | + foreach ( $this->fields as $k=>$v ) { |
|
338 | + if ( is_array( $v ) ) { |
|
339 | + if ( $v['count'] == 1 ) { |
|
340 | + $results[$k] = $v[0]; |
|
341 | + } else { |
|
342 | + array_shift( $v ); |
|
343 | + $results[$k] = $v; |
|
344 | + } |
|
345 | + } |
|
346 | + } |
|
347 | 347 | |
348 | 348 | return $results; |
349 | 349 | } |
350 | 350 | |
351 | - function GetRowNums() |
|
352 | - { |
|
353 | - $results = array(); |
|
354 | - foreach ( $this->fields as $k=>$v ) { |
|
355 | - static $i = 0; |
|
356 | - if (is_array( $v )) { |
|
357 | - if ( $v['count'] == 1 ) { |
|
358 | - $results[$i] = $v[0]; |
|
359 | - } else { |
|
360 | - array_shift( $v ); |
|
361 | - $results[$i] = $v; |
|
362 | - } |
|
363 | - $i++; |
|
364 | - } |
|
365 | - } |
|
366 | - return $results; |
|
367 | - } |
|
351 | + function GetRowNums() |
|
352 | + { |
|
353 | + $results = array(); |
|
354 | + foreach ( $this->fields as $k=>$v ) { |
|
355 | + static $i = 0; |
|
356 | + if (is_array( $v )) { |
|
357 | + if ( $v['count'] == 1 ) { |
|
358 | + $results[$i] = $v[0]; |
|
359 | + } else { |
|
360 | + array_shift( $v ); |
|
361 | + $results[$i] = $v; |
|
362 | + } |
|
363 | + $i++; |
|
364 | + } |
|
365 | + } |
|
366 | + return $results; |
|
367 | + } |
|
368 | 368 | |
369 | 369 | function _fetch() |
370 | 370 | { |
371 | 371 | if ( $this->_currentRow >= $this->_numOfRows && $this->_numOfRows >= 0 ) |
372 | - return false; |
|
372 | + return false; |
|
373 | 373 | |
374 | - if ( $this->_currentRow == 0 ) { |
|
374 | + if ( $this->_currentRow == 0 ) { |
|
375 | 375 | $this->_entryID = ldap_first_entry( $this->connection->_connectionID, $this->_queryID ); |
376 | - } else { |
|
377 | - $this->_entryID = ldap_next_entry( $this->connection->_connectionID, $this->_entryID ); |
|
378 | - } |
|
376 | + } else { |
|
377 | + $this->_entryID = ldap_next_entry( $this->connection->_connectionID, $this->_entryID ); |
|
378 | + } |
|
379 | 379 | |
380 | - $this->fields = ldap_get_attributes( $this->connection->_connectionID, $this->_entryID ); |
|
381 | - $this->_numOfFields = $this->fields['count']; |
|
382 | - switch ( $this->fetchMode ) { |
|
380 | + $this->fields = ldap_get_attributes( $this->connection->_connectionID, $this->_entryID ); |
|
381 | + $this->_numOfFields = $this->fields['count']; |
|
382 | + switch ( $this->fetchMode ) { |
|
383 | 383 | |
384 | - case LDAP_ASSOC: |
|
385 | - $this->fields = $this->GetRowAssoc(); |
|
386 | - break; |
|
384 | + case LDAP_ASSOC: |
|
385 | + $this->fields = $this->GetRowAssoc(); |
|
386 | + break; |
|
387 | 387 | |
388 | - case LDAP_NUM: |
|
388 | + case LDAP_NUM: |
|
389 | 389 | $this->fields = array_merge($this->GetRowNums(),$this->GetRowAssoc()); |
390 | - break; |
|
390 | + break; |
|
391 | 391 | |
392 | - case LDAP_BOTH: |
|
393 | - default: |
|
392 | + case LDAP_BOTH: |
|
393 | + default: |
|
394 | 394 | $this->fields = $this->GetRowNums(); |
395 | - break; |
|
396 | - } |
|
397 | - return ( is_array( $this->fields ) ); |
|
395 | + break; |
|
396 | + } |
|
397 | + return ( is_array( $this->fields ) ); |
|
398 | 398 | } |
399 | 399 | |
400 | 400 | function _close() { |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | function ServerInfo() |
41 | 41 | { |
42 | 42 | return array('description' => @odbtp_get_attr( ODB_ATTR_DBMSNAME, $this->_connectionID), |
43 | - 'version' => @odbtp_get_attr( ODB_ATTR_DBMSVER, $this->_connectionID)); |
|
43 | + 'version' => @odbtp_get_attr( ODB_ATTR_DBMSVER, $this->_connectionID)); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | function ErrorMsg() |
@@ -82,9 +82,9 @@ discard block |
||
82 | 82 | $path = @odbtp_get_attr( ODB_ATTR_DATABASENAME, $this->_connectionID ); |
83 | 83 | //if using vfp dbc file |
84 | 84 | if( !strcasecmp(strrchr($path, '.'), '.dbc') ) |
85 | - $path = substr($path,0,strrpos($path,'\/')); |
|
86 | - $seqtab = $path . '/' . $seqtab; |
|
87 | - } |
|
85 | + $path = substr($path,0,strrpos($path,'\/')); |
|
86 | + $seqtab = $path . '/' . $seqtab; |
|
87 | + } |
|
88 | 88 | if($num == false) { |
89 | 89 | if (empty($this->_genSeqSQL)) return false; |
90 | 90 | $ok = $this->Execute(sprintf($this->_genSeqSQL ,$seqtab)); |
@@ -110,9 +110,9 @@ discard block |
||
110 | 110 | $path = @odbtp_get_attr( ODB_ATTR_DATABASENAME, $this->_connectionID ); |
111 | 111 | //if using vfp dbc file |
112 | 112 | if( !strcasecmp(strrchr($path, '.'), '.dbc') ) |
113 | - $path = substr($path,0,strrpos($path,'\/')); |
|
114 | - $seqtab = $path . '/' . $seqtab; |
|
115 | - } |
|
113 | + $path = substr($path,0,strrpos($path,'\/')); |
|
114 | + $seqtab = $path . '/' . $seqtab; |
|
115 | + } |
|
116 | 116 | $MAXLOOPS = 100; |
117 | 117 | while (--$MAXLOOPS>=0) { |
118 | 118 | $num = $this->GetOne("select seq_value from adodb_seq where seq_name='$seq'"); |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | //for access : DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:\path_to_access_db\base_test.mdb;UID=root;PWD=; |
148 | 148 | //for mssql : DRIVER={SQL Server};SERVER=myserver;UID=myuid;PWD=mypwd;DATABASE=OdbtpTest; |
149 | 149 | //if uid & pwd can be separate |
150 | - function _connect($HostOrInterface, $UserOrDSN='', $argPassword='', $argDatabase='') |
|
150 | + function _connect($HostOrInterface, $UserOrDSN='', $argPassword='', $argDatabase='') |
|
151 | 151 | { |
152 | 152 | $this->_connectionID = @odbtp_connect($HostOrInterface,$UserOrDSN,$argPassword,$argDatabase); |
153 | 153 | if ($this->_connectionID === false) { |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | $this->ansiOuter = true; |
183 | 183 | $this->leftOuter = '*='; |
184 | 184 | $this->rightOuter = '=*'; |
185 | - $this->hasTop = 'top'; |
|
185 | + $this->hasTop = 'top'; |
|
186 | 186 | $this->hasInsertID = true; |
187 | 187 | $this->hasTransactions = true; |
188 | 188 | $this->_bindInputArray = true; |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | $this->fmtTimeStamp = "#Y-m-d h:i:sA#"; |
200 | 200 | $this->sysDate = "FORMAT(NOW,'yyyy-mm-dd')"; |
201 | 201 | $this->sysTimeStamp = 'NOW'; |
202 | - $this->hasTop = 'top'; |
|
202 | + $this->hasTop = 'top'; |
|
203 | 203 | $this->hasTransactions = false; |
204 | 204 | $this->_canPrepareSP = true; // For MS Access only. |
205 | 205 | break; |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | $this->sysDate = 'date()'; |
211 | 211 | $this->sysTimeStamp = 'datetime()'; |
212 | 212 | $this->ansiOuter = true; |
213 | - $this->hasTop = 'top'; |
|
213 | + $this->hasTop = 'top'; |
|
214 | 214 | $this->hasTransactions = false; |
215 | 215 | $this->replaceQuote = "'+chr(39)+'"; |
216 | 216 | $this->true = '.T.'; |
@@ -245,12 +245,12 @@ discard block |
||
245 | 245 | else |
246 | 246 | $this->hasTransactions = false; |
247 | 247 | } |
248 | - @odbtp_set_attr(ODB_ATTR_FULLCOLINFO, TRUE, $this->_connectionID ); |
|
248 | + @odbtp_set_attr(ODB_ATTR_FULLCOLINFO, TRUE, $this->_connectionID ); |
|
249 | 249 | |
250 | 250 | if ($this->_useUnicodeSQL ) |
251 | 251 | @odbtp_set_attr(ODB_ATTR_UNICODESQL, TRUE, $this->_connectionID); |
252 | 252 | |
253 | - return true; |
|
253 | + return true; |
|
254 | 254 | } |
255 | 255 | |
256 | 256 | function _pconnect($HostOrInterface, $UserOrDSN='', $argPassword='', $argDatabase='') |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | $fld->name = $rs->fields[3]; |
319 | 319 | $fld->type = $rs->fields[5]; |
320 | 320 | $fld->max_length = $rs->fields[6]; |
321 | - $fld->not_null = !empty($rs->fields[9]); |
|
321 | + $fld->not_null = !empty($rs->fields[9]); |
|
322 | 322 | $fld->scale = $rs->fields[7]; |
323 | 323 | if (!is_null($rs->fields[12])) { |
324 | 324 | $fld->has_default = true; |
@@ -547,7 +547,7 @@ discard block |
||
547 | 547 | if ($stmtid) { |
548 | 548 | $this->_lastAffectedRows = @odbtp_affected_rows($stmtid); |
549 | 549 | } |
550 | - return $stmtid; |
|
550 | + return $stmtid; |
|
551 | 551 | } |
552 | 552 | |
553 | 553 | function _close() |
@@ -583,7 +583,7 @@ discard block |
||
583 | 583 | |
584 | 584 | if ($this->connection->odbc_driver == ODB_DRIVER_JET) { |
585 | 585 | if (!@odbtp_get_attr(ODB_ATTR_MAPCHARTOWCHAR, |
586 | - $this->connection->_connectionID)) |
|
586 | + $this->connection->_connectionID)) |
|
587 | 587 | { |
588 | 588 | for ($f = 0; $f < $this->_numOfFields; $f++) { |
589 | 589 | if (@odbtp_field_bindtype($this->_queryID, $f) == ODB_CHAR) |
@@ -599,7 +599,7 @@ discard block |
||
599 | 599 | $o= new ADOFieldObject(); |
600 | 600 | $o->name = @odbtp_field_name($this->_queryID,$off); |
601 | 601 | $o->type = @odbtp_field_type($this->_queryID,$off); |
602 | - $o->max_length = @odbtp_field_length($this->_queryID,$off); |
|
602 | + $o->max_length = @odbtp_field_length($this->_queryID,$off); |
|
603 | 603 | if (ADODB_ASSOC_CASE == 0) $o->name = strtolower($o->name); |
604 | 604 | else if (ADODB_ASSOC_CASE == 1) $o->name = strtoupper($o->name); |
605 | 605 | return $o; |
@@ -633,7 +633,7 @@ discard block |
||
633 | 633 | case ADODB_FETCH_ASSOC: |
634 | 634 | $this->fields = @odbtp_fetch_assoc($this->_queryID, $type); |
635 | 635 | break; |
636 | - default: |
|
636 | + default: |
|
637 | 637 | $this->fields = @odbtp_fetch_array($this->_queryID, $type); |
638 | 638 | } |
639 | 639 | return is_array($this->fields); |
@@ -650,7 +650,7 @@ discard block |
||
650 | 650 | $this->EOF = false; |
651 | 651 | $this->_currentRow = 0; |
652 | 652 | return true; |
653 | - } |
|
653 | + } |
|
654 | 654 | |
655 | 655 | function MoveLast() |
656 | 656 | { |
@@ -71,8 +71,8 @@ |
||
71 | 71 | $fld->scale = $rs->fields[3]; |
72 | 72 | if ($rs->fields[1] == 'NUMBER' && $rs->fields[3] == 0) { |
73 | 73 | $fld->type ='INT'; |
74 | - $fld->max_length = $rs->fields[4]; |
|
75 | - } |
|
74 | + $fld->max_length = $rs->fields[4]; |
|
75 | + } |
|
76 | 76 | $fld->not_null = (strncmp($rs->fields[5], 'NOT',3) === 0); |
77 | 77 | $fld->binary = (strpos($fld->type,'BLOB') !== false); |
78 | 78 | $fld->default_value = $rs->fields[6]; |
@@ -180,41 +180,41 @@ |
||
180 | 180 | |
181 | 181 | function &MetaIndexes ($table, $primary = FALSE, $owner=false) |
182 | 182 | { |
183 | - // save old fetch mode |
|
184 | - global $ADODB_FETCH_MODE; |
|
185 | - $save = $ADODB_FETCH_MODE; |
|
186 | - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; |
|
187 | - if ($this->fetchMode !== FALSE) { |
|
188 | - $savem = $this->SetFetchMode(FALSE); |
|
189 | - } |
|
183 | + // save old fetch mode |
|
184 | + global $ADODB_FETCH_MODE; |
|
185 | + $save = $ADODB_FETCH_MODE; |
|
186 | + $ADODB_FETCH_MODE = ADODB_FETCH_NUM; |
|
187 | + if ($this->fetchMode !== FALSE) { |
|
188 | + $savem = $this->SetFetchMode(FALSE); |
|
189 | + } |
|
190 | 190 | $false = false; |
191 | 191 | // get index details |
192 | 192 | $table = strtoupper($table); |
193 | 193 | $SQL="SELECT NAME, UNIQUERULE, COLNAMES FROM SYSIBM.SYSINDEXES WHERE TBNAME='$table'"; |
194 | - if ($primary) |
|
194 | + if ($primary) |
|
195 | 195 | $SQL.= " AND UNIQUERULE='P'"; |
196 | 196 | $rs = $this->Execute($SQL); |
197 | - if (!is_object($rs)) { |
|
197 | + if (!is_object($rs)) { |
|
198 | 198 | if (isset($savem)) |
199 | 199 | $this->SetFetchMode($savem); |
200 | 200 | $ADODB_FETCH_MODE = $save; |
201 | - return $false; |
|
202 | - } |
|
201 | + return $false; |
|
202 | + } |
|
203 | 203 | $indexes = array (); |
204 | - // parse index data into array |
|
205 | - while ($row = $rs->FetchRow()) { |
|
204 | + // parse index data into array |
|
205 | + while ($row = $rs->FetchRow()) { |
|
206 | 206 | $indexes[$row[0]] = array( |
207 | 207 | 'unique' => ($row[1] == 'U' || $row[1] == 'P'), |
208 | 208 | 'columns' => array() |
209 | 209 | ); |
210 | 210 | $cols = ltrim($row[2],'+'); |
211 | 211 | $indexes[$row[0]]['columns'] = explode('+', $cols); |
212 | - } |
|
212 | + } |
|
213 | 213 | if (isset($savem)) { |
214 | - $this->SetFetchMode($savem); |
|
214 | + $this->SetFetchMode($savem); |
|
215 | 215 | $ADODB_FETCH_MODE = $save; |
216 | 216 | } |
217 | - return $indexes; |
|
217 | + return $indexes; |
|
218 | 218 | } |
219 | 219 | |
220 | 220 | // Format date column in sql string given an input format that understands Y M D |
@@ -72,16 +72,12 @@ discard block |
||
72 | 72 | ============================================================================= |
73 | 73 | |
74 | 74 | FUNCTION DESCRIPTIONS |
75 | - |
|
76 | - |
|
77 | -** FUNCTION adodb_getdate($date=false) |
|
75 | + ** FUNCTION adodb_getdate($date=false) |
|
78 | 76 | |
79 | 77 | Returns an array containing date information, as getdate(), but supports |
80 | 78 | dates greater than 1901 to 2038. The local date/time format is derived from a |
81 | 79 | heuristic the first time adodb_getdate is called. |
82 | - |
|
83 | - |
|
84 | -** FUNCTION adodb_date($fmt, $timestamp = false) |
|
80 | + ** FUNCTION adodb_date($fmt, $timestamp = false) |
|
85 | 81 | |
86 | 82 | Convert a timestamp to a formatted local date. If $timestamp is not defined, the |
87 | 83 | current timestamp is used. Unlike the function date(), it supports dates |
@@ -131,37 +127,27 @@ discard block |
||
131 | 127 | W - ISO-8601 week number of year, weeks starting on Monday |
132 | 128 | |
133 | 129 | </pre> |
134 | - |
|
135 | - |
|
136 | -** FUNCTION adodb_date2($fmt, $isoDateString = false) |
|
130 | + ** FUNCTION adodb_date2($fmt, $isoDateString = false) |
|
137 | 131 | Same as adodb_date, but 2nd parameter accepts iso date, eg. |
138 | 132 | |
139 | 133 | adodb_date2('d-M-Y H:i','2003-12-25 13:01:34'); |
140 | - |
|
141 | - |
|
142 | -** FUNCTION adodb_gmdate($fmt, $timestamp = false) |
|
134 | + ** FUNCTION adodb_gmdate($fmt, $timestamp = false) |
|
143 | 135 | |
144 | 136 | Convert a timestamp to a formatted GMT date. If $timestamp is not defined, the |
145 | 137 | current timestamp is used. Unlike the function date(), it supports dates |
146 | 138 | outside the 1901 to 2038 range. |
147 | - |
|
148 | - |
|
149 | -** FUNCTION adodb_mktime($hr, $min, $sec[, $month, $day, $year]) |
|
139 | + ** FUNCTION adodb_mktime($hr, $min, $sec[, $month, $day, $year]) |
|
150 | 140 | |
151 | 141 | Converts a local date to a unix timestamp. Unlike the function mktime(), it supports |
152 | 142 | dates outside the 1901 to 2038 range. All parameters are optional. |
153 | - |
|
154 | - |
|
155 | -** FUNCTION adodb_gmmktime($hr, $min, $sec [, $month, $day, $year]) |
|
143 | + ** FUNCTION adodb_gmmktime($hr, $min, $sec [, $month, $day, $year]) |
|
156 | 144 | |
157 | 145 | Converts a gmt date to a unix timestamp. Unlike the function gmmktime(), it supports |
158 | 146 | dates outside the 1901 to 2038 range. Differs from gmmktime() in that all parameters |
159 | 147 | are currently compulsory. |
160 | - |
|
161 | -** FUNCTION adodb_gmstrftime($fmt, $timestamp = false) |
|
148 | + ** FUNCTION adodb_gmstrftime($fmt, $timestamp = false) |
|
162 | 149 | Convert a timestamp to a formatted GMT date. |
163 | - |
|
164 | -** FUNCTION adodb_strftime($fmt, $timestamp = false) |
|
150 | + ** FUNCTION adodb_strftime($fmt, $timestamp = false) |
|
165 | 151 | |
166 | 152 | Convert a timestamp to a formatted local date. Internally converts $fmt into |
167 | 153 | adodb_date format, then echo result. |
@@ -578,17 +564,17 @@ discard block |
||
578 | 564 | $greg_correction = 0; |
579 | 565 | |
580 | 566 | if($month > 2) |
581 | - $month -= 2; |
|
567 | + $month -= 2; |
|
582 | 568 | else { |
583 | - $month += 10; |
|
584 | - $year--; |
|
569 | + $month += 10; |
|
570 | + $year--; |
|
585 | 571 | } |
586 | 572 | |
587 | 573 | $day = floor((13 * $month - 1) / 5) + |
588 | - $day + ($year % 100) + |
|
589 | - floor(($year % 100) / 4) + |
|
590 | - floor(($year / 100) / 4) - 2 * |
|
591 | - floor($year / 100) + 77 + $greg_correction; |
|
574 | + $day + ($year % 100) + |
|
575 | + floor(($year % 100) / 4) + |
|
576 | + floor(($year / 100) / 4) - 2 * |
|
577 | + floor($year / 100) + 77 + $greg_correction; |
|
592 | 578 | |
593 | 579 | return $day - 7 * floor($day / 7); |
594 | 580 | } |
@@ -30,7 +30,6 @@ discard block |
||
30 | 30 | |
31 | 31 | Latest Download at http://php.weblogs.com/adodb<br> |
32 | 32 | Manual is at http://php.weblogs.com/adodb_manual |
33 | - |
|
34 | 33 | */ |
35 | 34 | |
36 | 35 | if (!defined('_ADODB_LAYER')) { |
@@ -75,11 +74,11 @@ discard block |
||
75 | 74 | 2 = force empty. All empty, php null and string 'null' fields are changed to sql empty '' or 0 values. |
76 | 75 | 3 = force value. Value is left as it is. Php null and string 'null' are set to sql NULL values and empty fields '' are set to empty '' sql values. |
77 | 76 | */ |
78 | - define('ADODB_FORCE_IGNORE',0); |
|
79 | - define('ADODB_FORCE_NULL',1); |
|
80 | - define('ADODB_FORCE_EMPTY',2); |
|
81 | - define('ADODB_FORCE_VALUE',3); |
|
82 | - //********************************************************// |
|
77 | + define('ADODB_FORCE_IGNORE',0); |
|
78 | + define('ADODB_FORCE_NULL',1); |
|
79 | + define('ADODB_FORCE_EMPTY',2); |
|
80 | + define('ADODB_FORCE_VALUE',3); |
|
81 | + //********************************************************// |
|
83 | 82 | |
84 | 83 | |
85 | 84 | if (!$ADODB_EXTENSION || ADODB_EXTENSION < 4.0) { |
@@ -129,7 +128,7 @@ discard block |
||
129 | 128 | |
130 | 129 | /** |
131 | 130 | Accepts $src and $dest arrays, replacing string $data |
132 | - */ |
|
131 | + */ |
|
133 | 132 | function ADODB_str_replace($src, $dest, $data) |
134 | 133 | { |
135 | 134 | if (ADODB_PHPVER >= 0x4050) return str_replace($src,$dest,$data); |
@@ -338,7 +337,7 @@ discard block |
||
338 | 337 | |
339 | 338 | @returns An array with 2 elements: $arr['string'] is the description string, |
340 | 339 | and $arr[version] is the version (also a string). |
341 | - */ |
|
340 | + */ |
|
342 | 341 | function ServerInfo() |
343 | 342 | { |
344 | 343 | return array('description' => '', 'version' => ''); |
@@ -346,7 +345,7 @@ discard block |
||
346 | 345 | |
347 | 346 | function IsConnected() |
348 | 347 | { |
349 | - return !empty($this->_connectionID); |
|
348 | + return !empty($this->_connectionID); |
|
350 | 349 | } |
351 | 350 | |
352 | 351 | function _findvers($str) |
@@ -356,9 +355,9 @@ discard block |
||
356 | 355 | } |
357 | 356 | |
358 | 357 | /** |
359 | - * All error messages go through this bottleneck function. |
|
360 | - * You can define your own handler by defining the function name in ADODB_OUTP. |
|
361 | - */ |
|
358 | + * All error messages go through this bottleneck function. |
|
359 | + * You can define your own handler by defining the function name in ADODB_OUTP. |
|
360 | + */ |
|
362 | 361 | function outp($msg,$newline=true) |
363 | 362 | { |
364 | 363 | global $ADODB_FLUSH,$ADODB_OUTP; |
@@ -539,8 +538,8 @@ discard block |
||
539 | 538 | } |
540 | 539 | |
541 | 540 | /** |
542 | - * PEAR DB Compat |
|
543 | - */ |
|
541 | + * PEAR DB Compat |
|
542 | + */ |
|
544 | 543 | function Quote($s) |
545 | 544 | { |
546 | 545 | return $this->qstr($s,false); |
@@ -548,7 +547,7 @@ discard block |
||
548 | 547 | |
549 | 548 | /** |
550 | 549 | Requested by "Karsten Dambekalns" <[email protected]> |
551 | - */ |
|
550 | + */ |
|
552 | 551 | function QMagic($s) |
553 | 552 | { |
554 | 553 | return $this->qstr($s,get_magic_quotes_gpc()); |
@@ -560,8 +559,8 @@ discard block |
||
560 | 559 | } |
561 | 560 | |
562 | 561 | /** |
563 | - * PEAR DB Compat - do not use internally. |
|
564 | - */ |
|
562 | + * PEAR DB Compat - do not use internally. |
|
563 | + */ |
|
565 | 564 | function ErrorNative() |
566 | 565 | { |
567 | 566 | return $this->ErrorNo(); |
@@ -569,20 +568,20 @@ discard block |
||
569 | 568 | |
570 | 569 | |
571 | 570 | /** |
572 | - * PEAR DB Compat - do not use internally. |
|
573 | - */ |
|
571 | + * PEAR DB Compat - do not use internally. |
|
572 | + */ |
|
574 | 573 | function nextId($seq_name) |
575 | 574 | { |
576 | 575 | return $this->GenID($seq_name); |
577 | 576 | } |
578 | 577 | |
579 | 578 | /** |
580 | - * Lock a row, will escalate and lock the table if row locking not supported |
|
581 | - * will normally free the lock at the end of the transaction |
|
582 | - * |
|
583 | - * @param $table name of table to lock |
|
584 | - * @param $where where clause to use, eg: "WHERE row=12". If left empty, will escalate to table lock |
|
585 | - */ |
|
579 | + * Lock a row, will escalate and lock the table if row locking not supported |
|
580 | + * will normally free the lock at the end of the transaction |
|
581 | + * |
|
582 | + * @param $table name of table to lock |
|
583 | + * @param $where where clause to use, eg: "WHERE row=12". If left empty, will escalate to table lock |
|
584 | + */ |
|
586 | 585 | function RowLock($table,$where) |
587 | 586 | { |
588 | 587 | return false; |
@@ -599,14 +598,14 @@ discard block |
||
599 | 598 | } |
600 | 599 | |
601 | 600 | /** |
602 | - * PEAR DB Compat - do not use internally. |
|
603 | - * |
|
604 | - * The fetch modes for NUMERIC and ASSOC for PEAR DB and ADODB are identical |
|
605 | - * for easy porting :-) |
|
606 | - * |
|
607 | - * @param mode The fetchmode ADODB_FETCH_ASSOC or ADODB_FETCH_NUM |
|
608 | - * @returns The previous fetch mode |
|
609 | - */ |
|
601 | + * PEAR DB Compat - do not use internally. |
|
602 | + * |
|
603 | + * The fetch modes for NUMERIC and ASSOC for PEAR DB and ADODB are identical |
|
604 | + * for easy porting :-) |
|
605 | + * |
|
606 | + * @param mode The fetchmode ADODB_FETCH_ASSOC or ADODB_FETCH_NUM |
|
607 | + * @returns The previous fetch mode |
|
608 | + */ |
|
610 | 609 | function SetFetchMode($mode) |
611 | 610 | { |
612 | 611 | $old = $this->fetchMode; |
@@ -621,8 +620,8 @@ discard block |
||
621 | 620 | |
622 | 621 | |
623 | 622 | /** |
624 | - * PEAR DB Compat - do not use internally. |
|
625 | - */ |
|
623 | + * PEAR DB Compat - do not use internally. |
|
624 | + */ |
|
626 | 625 | function &Query($sql, $inputarr=false) |
627 | 626 | { |
628 | 627 | $rs = &$this->Execute($sql, $inputarr); |
@@ -632,8 +631,8 @@ discard block |
||
632 | 631 | |
633 | 632 | |
634 | 633 | /** |
635 | - * PEAR DB Compat - do not use internally |
|
636 | - */ |
|
634 | + * PEAR DB Compat - do not use internally |
|
635 | + */ |
|
637 | 636 | function &LimitQuery($sql, $offset, $count, $params=false) |
638 | 637 | { |
639 | 638 | $rs = &$this->SelectLimit($sql, $count, $offset, $params); |
@@ -643,8 +642,8 @@ discard block |
||
643 | 642 | |
644 | 643 | |
645 | 644 | /** |
646 | - * PEAR DB Compat - do not use internally |
|
647 | - */ |
|
645 | + * PEAR DB Compat - do not use internally |
|
646 | + */ |
|
648 | 647 | function Disconnect() |
649 | 648 | { |
650 | 649 | return $this->Close(); |
@@ -709,7 +708,7 @@ discard block |
||
709 | 708 | b. CompleteTrans auto-detects SQL errors, and will rollback on errors, commit otherwise.<br> |
710 | 709 | c. All BeginTrans/CommitTrans/RollbackTrans inside a StartTrans/CompleteTrans block |
711 | 710 | are disabled, making it backward compatible. |
712 | - */ |
|
711 | + */ |
|
713 | 712 | function StartTrans($errfn = 'ADODB_TransMonitor') |
714 | 713 | { |
715 | 714 | if ($this->transOff > 0) { |
@@ -734,7 +733,7 @@ discard block |
||
734 | 733 | @autoComplete if true, monitor sql errors and commit and rollback as appropriate, |
735 | 734 | and if set to false force rollback even if no SQL error detected. |
736 | 735 | @returns true on commit, false on rollback. |
737 | - */ |
|
736 | + */ |
|
738 | 737 | function CompleteTrans($autoComplete = true) |
739 | 738 | { |
740 | 739 | if ($this->transOff > 1) { |
@@ -776,7 +775,7 @@ discard block |
||
776 | 775 | |
777 | 776 | /** |
778 | 777 | Check if transaction has failed, only for Smart Transactions. |
779 | - */ |
|
778 | + */ |
|
780 | 779 | function HasFailedTrans() |
781 | 780 | { |
782 | 781 | if ($this->transOff > 0) return $this->_transOK == false; |
@@ -990,8 +989,8 @@ discard block |
||
990 | 989 | } |
991 | 990 | |
992 | 991 | /** |
993 | - * @return # rows affected by UPDATE/DELETE |
|
994 | - */ |
|
992 | + * @return # rows affected by UPDATE/DELETE |
|
993 | + */ |
|
995 | 994 | function Affected_Rows() |
996 | 995 | { |
997 | 996 | if ($this->hasAffectedRows) { |
@@ -1076,24 +1075,24 @@ discard block |
||
1076 | 1075 | |
1077 | 1076 | |
1078 | 1077 | /** |
1079 | - * Will select, getting rows from $offset (1-based), for $nrows. |
|
1080 | - * This simulates the MySQL "select * from table limit $offset,$nrows" , and |
|
1081 | - * the PostgreSQL "select * from table limit $nrows offset $offset". Note that |
|
1082 | - * MySQL and PostgreSQL parameter ordering is the opposite of the other. |
|
1083 | - * eg. |
|
1084 | - * SelectLimit('select * from table',3); will return rows 1 to 3 (1-based) |
|
1085 | - * SelectLimit('select * from table',3,2); will return rows 3 to 5 (1-based) |
|
1086 | - * |
|
1087 | - * Uses SELECT TOP for Microsoft databases (when $this->hasTop is set) |
|
1088 | - * BUG: Currently SelectLimit fails with $sql with LIMIT or TOP clause already set |
|
1089 | - * |
|
1090 | - * @param sql |
|
1091 | - * @param [offset] is the row to start calculations from (1-based) |
|
1092 | - * @param [nrows] is the number of rows to get |
|
1093 | - * @param [inputarr] array of bind variables |
|
1094 | - * @param [secs2cache] is a private parameter only used by jlim |
|
1095 | - * @return the recordset ($rs->databaseType == 'array') |
|
1096 | - */ |
|
1078 | + * Will select, getting rows from $offset (1-based), for $nrows. |
|
1079 | + * This simulates the MySQL "select * from table limit $offset,$nrows" , and |
|
1080 | + * the PostgreSQL "select * from table limit $nrows offset $offset". Note that |
|
1081 | + * MySQL and PostgreSQL parameter ordering is the opposite of the other. |
|
1082 | + * eg. |
|
1083 | + * SelectLimit('select * from table',3); will return rows 1 to 3 (1-based) |
|
1084 | + * SelectLimit('select * from table',3,2); will return rows 3 to 5 (1-based) |
|
1085 | + * |
|
1086 | + * Uses SELECT TOP for Microsoft databases (when $this->hasTop is set) |
|
1087 | + * BUG: Currently SelectLimit fails with $sql with LIMIT or TOP clause already set |
|
1088 | + * |
|
1089 | + * @param sql |
|
1090 | + * @param [offset] is the row to start calculations from (1-based) |
|
1091 | + * @param [nrows] is the number of rows to get |
|
1092 | + * @param [inputarr] array of bind variables |
|
1093 | + * @param [secs2cache] is a private parameter only used by jlim |
|
1094 | + * @return the recordset ($rs->databaseType == 'array') |
|
1095 | + */ |
|
1097 | 1096 | function &SelectLimit($sql,$nrows=-1,$offset=-1, $inputarr=false,$secs2cache=0) |
1098 | 1097 | { |
1099 | 1098 | if ($this->hasTop && $nrows > 0) { |
@@ -1158,10 +1157,10 @@ discard block |
||
1158 | 1157 | } |
1159 | 1158 | |
1160 | 1159 | /** |
1161 | - * Create serializable recordset. Breaks rs link to connection. |
|
1162 | - * |
|
1163 | - * @param rs the recordset to serialize |
|
1164 | - */ |
|
1160 | + * Create serializable recordset. Breaks rs link to connection. |
|
1161 | + * |
|
1162 | + * @param rs the recordset to serialize |
|
1163 | + */ |
|
1165 | 1164 | function &SerializableRS(&$rs) |
1166 | 1165 | { |
1167 | 1166 | $rs2 =& $this->_rs2rs($rs); |
@@ -1172,15 +1171,15 @@ discard block |
||
1172 | 1171 | } |
1173 | 1172 | |
1174 | 1173 | /** |
1175 | - * Convert database recordset to an array recordset |
|
1176 | - * input recordset's cursor should be at beginning, and |
|
1177 | - * old $rs will be closed. |
|
1178 | - * |
|
1179 | - * @param rs the recordset to copy |
|
1180 | - * @param [nrows] number of rows to retrieve (optional) |
|
1181 | - * @param [offset] offset by number of rows (optional) |
|
1182 | - * @return the new recordset |
|
1183 | - */ |
|
1174 | + * Convert database recordset to an array recordset |
|
1175 | + * input recordset's cursor should be at beginning, and |
|
1176 | + * old $rs will be closed. |
|
1177 | + * |
|
1178 | + * @param rs the recordset to copy |
|
1179 | + * @param [nrows] number of rows to retrieve (optional) |
|
1180 | + * @param [offset] offset by number of rows (optional) |
|
1181 | + * @return the new recordset |
|
1182 | + */ |
|
1184 | 1183 | function &_rs2rs(&$rs,$nrows=-1,$offset=-1,$close=true) |
1185 | 1184 | { |
1186 | 1185 | if (! $rs) { |
@@ -1253,12 +1252,12 @@ discard block |
||
1253 | 1252 | } |
1254 | 1253 | |
1255 | 1254 | /** |
1256 | - * Return first element of first row of sql statement. Recordset is disposed |
|
1257 | - * for you. |
|
1258 | - * |
|
1259 | - * @param sql SQL statement |
|
1260 | - * @param [inputarr] input bind array |
|
1261 | - */ |
|
1255 | + * Return first element of first row of sql statement. Recordset is disposed |
|
1256 | + * for you. |
|
1257 | + * |
|
1258 | + * @param sql SQL statement |
|
1259 | + * @param [inputarr] input bind array |
|
1260 | + */ |
|
1262 | 1261 | function GetOne($sql,$inputarr=false) |
1263 | 1262 | { |
1264 | 1263 | global $ADODB_COUNTRECS; |
@@ -1345,10 +1344,10 @@ discard block |
||
1345 | 1344 | |
1346 | 1345 | |
1347 | 1346 | /** |
1348 | - * |
|
1349 | - * @param sql SQL statement |
|
1350 | - * @param [inputarr] input bind array |
|
1351 | - */ |
|
1347 | + * |
|
1348 | + * @param sql SQL statement |
|
1349 | + * @param [inputarr] input bind array |
|
1350 | + */ |
|
1352 | 1351 | function &GetArray($sql,$inputarr=false) |
1353 | 1352 | { |
1354 | 1353 | global $ADODB_COUNTRECS; |
@@ -1396,11 +1395,11 @@ discard block |
||
1396 | 1395 | |
1397 | 1396 | |
1398 | 1397 | /** |
1399 | - * Return one row of sql statement. Recordset is disposed for you. |
|
1400 | - * |
|
1401 | - * @param sql SQL statement |
|
1402 | - * @param [inputarr] input bind array |
|
1403 | - */ |
|
1398 | + * Return one row of sql statement. Recordset is disposed for you. |
|
1399 | + * |
|
1400 | + * @param sql SQL statement |
|
1401 | + * @param [inputarr] input bind array |
|
1402 | + */ |
|
1404 | 1403 | function &GetRow($sql,$inputarr=false) |
1405 | 1404 | { |
1406 | 1405 | global $ADODB_COUNTRECS; |
@@ -1435,24 +1434,24 @@ discard block |
||
1435 | 1434 | } |
1436 | 1435 | |
1437 | 1436 | /** |
1438 | - * Insert or replace a single record. Note: this is not the same as MySQL's replace. |
|
1439 | - * ADOdb's Replace() uses update-insert semantics, not insert-delete-duplicates of MySQL. |
|
1440 | - * Also note that no table locking is done currently, so it is possible that the |
|
1441 | - * record be inserted twice by two programs... |
|
1442 | - * |
|
1443 | - * $this->Replace('products', array('prodname' =>"'Nails'","price" => 3.99), 'prodname'); |
|
1444 | - * |
|
1445 | - * $table table name |
|
1446 | - * $fieldArray associative array of data (you must quote strings yourself). |
|
1447 | - * $keyCol the primary key field name or if compound key, array of field names |
|
1448 | - * autoQuote set to true to use a hueristic to quote strings. Works with nulls and numbers |
|
1449 | - * but does not work with dates nor SQL functions. |
|
1450 | - * has_autoinc the primary key is an auto-inc field, so skip in insert. |
|
1451 | - * |
|
1452 | - * Currently blob replace not supported |
|
1453 | - * |
|
1454 | - * returns 0 = fail, 1 = update, 2 = insert |
|
1455 | - */ |
|
1437 | + * Insert or replace a single record. Note: this is not the same as MySQL's replace. |
|
1438 | + * ADOdb's Replace() uses update-insert semantics, not insert-delete-duplicates of MySQL. |
|
1439 | + * Also note that no table locking is done currently, so it is possible that the |
|
1440 | + * record be inserted twice by two programs... |
|
1441 | + * |
|
1442 | + * $this->Replace('products', array('prodname' =>"'Nails'","price" => 3.99), 'prodname'); |
|
1443 | + * |
|
1444 | + * $table table name |
|
1445 | + * $fieldArray associative array of data (you must quote strings yourself). |
|
1446 | + * $keyCol the primary key field name or if compound key, array of field names |
|
1447 | + * autoQuote set to true to use a hueristic to quote strings. Works with nulls and numbers |
|
1448 | + * but does not work with dates nor SQL functions. |
|
1449 | + * has_autoinc the primary key is an auto-inc field, so skip in insert. |
|
1450 | + * |
|
1451 | + * Currently blob replace not supported |
|
1452 | + * |
|
1453 | + * returns 0 = fail, 1 = update, 2 = insert |
|
1454 | + */ |
|
1456 | 1455 | |
1457 | 1456 | function Replace($table, $fieldArray, $keyCol, $autoQuote=false, $has_autoinc=false) |
1458 | 1457 | { |
@@ -1464,23 +1463,23 @@ discard block |
||
1464 | 1463 | |
1465 | 1464 | |
1466 | 1465 | /** |
1467 | - * Will select, getting rows from $offset (1-based), for $nrows. |
|
1468 | - * This simulates the MySQL "select * from table limit $offset,$nrows" , and |
|
1469 | - * the PostgreSQL "select * from table limit $nrows offset $offset". Note that |
|
1470 | - * MySQL and PostgreSQL parameter ordering is the opposite of the other. |
|
1471 | - * eg. |
|
1472 | - * CacheSelectLimit(15,'select * from table',3); will return rows 1 to 3 (1-based) |
|
1473 | - * CacheSelectLimit(15,'select * from table',3,2); will return rows 3 to 5 (1-based) |
|
1474 | - * |
|
1475 | - * BUG: Currently CacheSelectLimit fails with $sql with LIMIT or TOP clause already set |
|
1476 | - * |
|
1477 | - * @param [secs2cache] seconds to cache data, set to 0 to force query. This is optional |
|
1478 | - * @param sql |
|
1479 | - * @param [offset] is the row to start calculations from (1-based) |
|
1480 | - * @param [nrows] is the number of rows to get |
|
1481 | - * @param [inputarr] array of bind variables |
|
1482 | - * @return the recordset ($rs->databaseType == 'array') |
|
1483 | - */ |
|
1466 | + * Will select, getting rows from $offset (1-based), for $nrows. |
|
1467 | + * This simulates the MySQL "select * from table limit $offset,$nrows" , and |
|
1468 | + * the PostgreSQL "select * from table limit $nrows offset $offset". Note that |
|
1469 | + * MySQL and PostgreSQL parameter ordering is the opposite of the other. |
|
1470 | + * eg. |
|
1471 | + * CacheSelectLimit(15,'select * from table',3); will return rows 1 to 3 (1-based) |
|
1472 | + * CacheSelectLimit(15,'select * from table',3,2); will return rows 3 to 5 (1-based) |
|
1473 | + * |
|
1474 | + * BUG: Currently CacheSelectLimit fails with $sql with LIMIT or TOP clause already set |
|
1475 | + * |
|
1476 | + * @param [secs2cache] seconds to cache data, set to 0 to force query. This is optional |
|
1477 | + * @param sql |
|
1478 | + * @param [offset] is the row to start calculations from (1-based) |
|
1479 | + * @param [nrows] is the number of rows to get |
|
1480 | + * @param [inputarr] array of bind variables |
|
1481 | + * @return the recordset ($rs->databaseType == 'array') |
|
1482 | + */ |
|
1484 | 1483 | function &CacheSelectLimit($secs2cache,$sql,$nrows=-1,$offset=-1,$inputarr=false) |
1485 | 1484 | { |
1486 | 1485 | if (!is_numeric($secs2cache)) { |
@@ -1496,9 +1495,9 @@ discard block |
||
1496 | 1495 | } |
1497 | 1496 | |
1498 | 1497 | /** |
1499 | - * Flush cached recordsets that match a particular $sql statement. |
|
1500 | - * If $sql == false, then we purge all files in the cache. |
|
1501 | - */ |
|
1498 | + * Flush cached recordsets that match a particular $sql statement. |
|
1499 | + * If $sql == false, then we purge all files in the cache. |
|
1500 | + */ |
|
1502 | 1501 | function CacheFlush($sql=false,$inputarr=false) |
1503 | 1502 | { |
1504 | 1503 | global $ADODB_CACHE_DIR; |
@@ -1530,19 +1529,19 @@ discard block |
||
1530 | 1529 | } |
1531 | 1530 | |
1532 | 1531 | /** |
1533 | - * Private function to generate filename for caching. |
|
1534 | - * Filename is generated based on: |
|
1535 | - * |
|
1536 | - * - sql statement |
|
1537 | - * - database type (oci8, ibase, ifx, etc) |
|
1538 | - * - database name |
|
1539 | - * - userid |
|
1540 | - * - setFetchMode (adodb 4.23) |
|
1541 | - * |
|
1542 | - * When not in safe mode, we create 256 sub-directories in the cache directory ($ADODB_CACHE_DIR). |
|
1543 | - * Assuming that we can have 50,000 files per directory with good performance, |
|
1544 | - * then we can scale to 12.8 million unique cached recordsets. Wow! |
|
1545 | - */ |
|
1532 | + * Private function to generate filename for caching. |
|
1533 | + * Filename is generated based on: |
|
1534 | + * |
|
1535 | + * - sql statement |
|
1536 | + * - database type (oci8, ibase, ifx, etc) |
|
1537 | + * - database name |
|
1538 | + * - userid |
|
1539 | + * - setFetchMode (adodb 4.23) |
|
1540 | + * |
|
1541 | + * When not in safe mode, we create 256 sub-directories in the cache directory ($ADODB_CACHE_DIR). |
|
1542 | + * Assuming that we can have 50,000 files per directory with good performance, |
|
1543 | + * then we can scale to 12.8 million unique cached recordsets. Wow! |
|
1544 | + */ |
|
1546 | 1545 | function _gencachename($sql,$createdir) |
1547 | 1546 | { |
1548 | 1547 | global $ADODB_CACHE_DIR; |
@@ -1712,17 +1711,17 @@ discard block |
||
1712 | 1711 | * be a simple select stmt with no groupby/orderby/limit |
1713 | 1712 | * |
1714 | 1713 | * "Jonathan Younger" <[email protected]> |
1715 | - */ |
|
1714 | + */ |
|
1716 | 1715 | function GetUpdateSQL(&$rs, $arrFields,$forceUpdate=false,$magicq=false,$force=null) |
1717 | 1716 | { |
1718 | 1717 | global $ADODB_INCLUDED_LIB; |
1719 | 1718 | |
1720 | - //********************************************************// |
|
1721 | - //This is here to maintain compatibility |
|
1722 | - //with older adodb versions. Sets force type to force nulls if $forcenulls is set. |
|
1719 | + //********************************************************// |
|
1720 | + //This is here to maintain compatibility |
|
1721 | + //with older adodb versions. Sets force type to force nulls if $forcenulls is set. |
|
1723 | 1722 | if (!isset($force)) { |
1724 | 1723 | global $ADODB_FORCE_TYPE; |
1725 | - $force = $ADODB_FORCE_TYPE; |
|
1724 | + $force = $ADODB_FORCE_TYPE; |
|
1726 | 1725 | } |
1727 | 1726 | //********************************************************// |
1728 | 1727 | |
@@ -1740,7 +1739,7 @@ discard block |
||
1740 | 1739 | * |
1741 | 1740 | * Note: This function should only be used on a recordset |
1742 | 1741 | * that is run against a single table. |
1743 | - */ |
|
1742 | + */ |
|
1744 | 1743 | function GetInsertSQL(&$rs, $arrFields,$magicq=false,$force=null) |
1745 | 1744 | { |
1746 | 1745 | global $ADODB_INCLUDED_LIB; |
@@ -1755,23 +1754,23 @@ discard block |
||
1755 | 1754 | |
1756 | 1755 | |
1757 | 1756 | /** |
1758 | - * Update a blob column, given a where clause. There are more sophisticated |
|
1759 | - * blob handling functions that we could have implemented, but all require |
|
1760 | - * a very complex API. Instead we have chosen something that is extremely |
|
1761 | - * simple to understand and use. |
|
1762 | - * |
|
1763 | - * Note: $blobtype supports 'BLOB' and 'CLOB', default is BLOB of course. |
|
1764 | - * |
|
1765 | - * Usage to update a $blobvalue which has a primary key blob_id=1 into a |
|
1766 | - * field blobtable.blobcolumn: |
|
1767 | - * |
|
1768 | - * UpdateBlob('blobtable', 'blobcolumn', $blobvalue, 'blob_id=1'); |
|
1769 | - * |
|
1770 | - * Insert example: |
|
1771 | - * |
|
1772 | - * $conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)'); |
|
1773 | - * $conn->UpdateBlob('blobtable','blobcol',$blob,'id=1'); |
|
1774 | - */ |
|
1757 | + * Update a blob column, given a where clause. There are more sophisticated |
|
1758 | + * blob handling functions that we could have implemented, but all require |
|
1759 | + * a very complex API. Instead we have chosen something that is extremely |
|
1760 | + * simple to understand and use. |
|
1761 | + * |
|
1762 | + * Note: $blobtype supports 'BLOB' and 'CLOB', default is BLOB of course. |
|
1763 | + * |
|
1764 | + * Usage to update a $blobvalue which has a primary key blob_id=1 into a |
|
1765 | + * field blobtable.blobcolumn: |
|
1766 | + * |
|
1767 | + * UpdateBlob('blobtable', 'blobcolumn', $blobvalue, 'blob_id=1'); |
|
1768 | + * |
|
1769 | + * Insert example: |
|
1770 | + * |
|
1771 | + * $conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)'); |
|
1772 | + * $conn->UpdateBlob('blobtable','blobcol',$blob,'id=1'); |
|
1773 | + */ |
|
1775 | 1774 | |
1776 | 1775 | function UpdateBlob($table,$column,$val,$where,$blobtype='BLOB') |
1777 | 1776 | { |
@@ -1779,14 +1778,14 @@ discard block |
||
1779 | 1778 | } |
1780 | 1779 | |
1781 | 1780 | /** |
1782 | - * Usage: |
|
1783 | - * UpdateBlob('TABLE', 'COLUMN', '/path/to/file', 'ID=1'); |
|
1784 | - * |
|
1785 | - * $blobtype supports 'BLOB' and 'CLOB' |
|
1786 | - * |
|
1787 | - * $conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)'); |
|
1788 | - * $conn->UpdateBlob('blobtable','blobcol',$blobpath,'id=1'); |
|
1789 | - */ |
|
1781 | + * Usage: |
|
1782 | + * UpdateBlob('TABLE', 'COLUMN', '/path/to/file', 'ID=1'); |
|
1783 | + * |
|
1784 | + * $blobtype supports 'BLOB' and 'CLOB' |
|
1785 | + * |
|
1786 | + * $conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)'); |
|
1787 | + * $conn->UpdateBlob('blobtable','blobcol',$blobpath,'id=1'); |
|
1788 | + */ |
|
1790 | 1789 | function UpdateBlobFile($table,$column,$path,$where,$blobtype='BLOB') |
1791 | 1790 | { |
1792 | 1791 | $fd = fopen($path,'rb'); |
@@ -1835,12 +1834,12 @@ discard block |
||
1835 | 1834 | } |
1836 | 1835 | |
1837 | 1836 | /** |
1838 | - * Usage: |
|
1839 | - * UpdateClob('TABLE', 'COLUMN', $var, 'ID=1', 'CLOB'); |
|
1840 | - * |
|
1841 | - * $conn->Execute('INSERT INTO clobtable (id, clobcol) VALUES (1, null)'); |
|
1842 | - * $conn->UpdateClob('clobtable','clobcol',$clob,'id=1'); |
|
1843 | - */ |
|
1837 | + * Usage: |
|
1838 | + * UpdateClob('TABLE', 'COLUMN', $var, 'ID=1', 'CLOB'); |
|
1839 | + * |
|
1840 | + * $conn->Execute('INSERT INTO clobtable (id, clobcol) VALUES (1, null)'); |
|
1841 | + * $conn->UpdateClob('clobtable','clobcol',$clob,'id=1'); |
|
1842 | + */ |
|
1844 | 1843 | function UpdateClob($table,$column,$val,$where) |
1845 | 1844 | { |
1846 | 1845 | return $this->UpdateBlob($table,$column,$val,$where,'CLOB'); |
@@ -1861,9 +1860,9 @@ discard block |
||
1861 | 1860 | |
1862 | 1861 | |
1863 | 1862 | /** |
1864 | - * Change the SQL connection locale to a specified locale. |
|
1865 | - * This is used to get the date formats written depending on the client locale. |
|
1866 | - */ |
|
1863 | + * Change the SQL connection locale to a specified locale. |
|
1864 | + * This is used to get the date formats written depending on the client locale. |
|
1865 | + */ |
|
1867 | 1866 | function SetDateLocale($locale = 'En') |
1868 | 1867 | { |
1869 | 1868 | $this->locale = $locale; |
@@ -2077,12 +2076,12 @@ discard block |
||
2077 | 2076 | return $false; |
2078 | 2077 | } |
2079 | 2078 | |
2080 | - /** |
|
2081 | - * List indexes on a table as an array. |
|
2082 | - * @param table table name to query |
|
2083 | - * @param primary true to only show primary keys. Not actually used for most databases |
|
2084 | - * |
|
2085 | - * @return array of indexes on current table. Each element represents an index, and is itself an associative array. |
|
2079 | + /** |
|
2080 | + * List indexes on a table as an array. |
|
2081 | + * @param table table name to query |
|
2082 | + * @param primary true to only show primary keys. Not actually used for most databases |
|
2083 | + * |
|
2084 | + * @return array of indexes on current table. Each element represents an index, and is itself an associative array. |
|
2086 | 2085 | |
2087 | 2086 | Array ( |
2088 | 2087 | [name_of_index] => Array |
@@ -2094,12 +2093,12 @@ discard block |
||
2094 | 2093 | [1] => lastname |
2095 | 2094 | ) |
2096 | 2095 | ) |
2097 | - */ |
|
2098 | - function &MetaIndexes($table, $primary = false, $owner = false) |
|
2099 | - { |
|
2096 | + */ |
|
2097 | + function &MetaIndexes($table, $primary = false, $owner = false) |
|
2098 | + { |
|
2100 | 2099 | $false = false; |
2101 | - return $false; |
|
2102 | - } |
|
2100 | + return $false; |
|
2101 | + } |
|
2103 | 2102 | |
2104 | 2103 | /** |
2105 | 2104 | * List columns names in a table as an array. |
@@ -2259,12 +2258,12 @@ discard block |
||
2259 | 2258 | } |
2260 | 2259 | |
2261 | 2260 | /** |
2262 | - * |
|
2263 | - * @param v is the character timestamp in YYYY-MM-DD hh:mm:ss format |
|
2264 | - * @param fmt is the format to apply to it, using date() |
|
2265 | - * |
|
2266 | - * @return a timestamp formated as user desires |
|
2267 | - */ |
|
2261 | + * |
|
2262 | + * @param v is the character timestamp in YYYY-MM-DD hh:mm:ss format |
|
2263 | + * @param fmt is the format to apply to it, using date() |
|
2264 | + * |
|
2265 | + * @return a timestamp formated as user desires |
|
2266 | + */ |
|
2268 | 2267 | function UserTimeStamp($v,$fmt='Y-m-d H:i:s',$gmt=false) |
2269 | 2268 | { |
2270 | 2269 | if (!isset($v)) return $this->emptyTimeStamp; |
@@ -2283,8 +2282,8 @@ discard block |
||
2283 | 2282 | } |
2284 | 2283 | |
2285 | 2284 | /** |
2286 | - * Quotes a string, without prefixing nor appending quotes. |
|
2287 | - */ |
|
2285 | + * Quotes a string, without prefixing nor appending quotes. |
|
2286 | + */ |
|
2288 | 2287 | function addq($s,$magic_quotes=false) |
2289 | 2288 | { |
2290 | 2289 | if (!$magic_quotes) { |
@@ -2344,22 +2343,22 @@ discard block |
||
2344 | 2343 | |
2345 | 2344 | |
2346 | 2345 | /** |
2347 | - * Will select the supplied $page number from a recordset, given that it is paginated in pages of |
|
2348 | - * $nrows rows per page. It also saves two boolean values saying if the given page is the first |
|
2349 | - * and/or last one of the recordset. Added by Iv�n Oliva to provide recordset pagination. |
|
2350 | - * |
|
2351 | - * See readme.htm#ex8 for an example of usage. |
|
2352 | - * |
|
2353 | - * @param sql |
|
2354 | - * @param nrows is the number of rows per page to get |
|
2355 | - * @param page is the page number to get (1-based) |
|
2356 | - * @param [inputarr] array of bind variables |
|
2357 | - * @param [secs2cache] is a private parameter only used by jlim |
|
2358 | - * @return the recordset ($rs->databaseType == 'array') |
|
2359 | - * |
|
2360 | - * NOTE: phpLens uses a different algorithm and does not use PageExecute(). |
|
2361 | - * |
|
2362 | - */ |
|
2346 | + * Will select the supplied $page number from a recordset, given that it is paginated in pages of |
|
2347 | + * $nrows rows per page. It also saves two boolean values saying if the given page is the first |
|
2348 | + * and/or last one of the recordset. Added by Iv�n Oliva to provide recordset pagination. |
|
2349 | + * |
|
2350 | + * See readme.htm#ex8 for an example of usage. |
|
2351 | + * |
|
2352 | + * @param sql |
|
2353 | + * @param nrows is the number of rows per page to get |
|
2354 | + * @param page is the page number to get (1-based) |
|
2355 | + * @param [inputarr] array of bind variables |
|
2356 | + * @param [secs2cache] is a private parameter only used by jlim |
|
2357 | + * @return the recordset ($rs->databaseType == 'array') |
|
2358 | + * |
|
2359 | + * NOTE: phpLens uses a different algorithm and does not use PageExecute(). |
|
2360 | + * |
|
2361 | + */ |
|
2363 | 2362 | function &PageExecute($sql, $nrows, $page, $inputarr=false, $secs2cache=0) |
2364 | 2363 | { |
2365 | 2364 | global $ADODB_INCLUDED_LIB; |
@@ -2371,17 +2370,17 @@ discard block |
||
2371 | 2370 | |
2372 | 2371 | |
2373 | 2372 | /** |
2374 | - * Will select the supplied $page number from a recordset, given that it is paginated in pages of |
|
2375 | - * $nrows rows per page. It also saves two boolean values saying if the given page is the first |
|
2376 | - * and/or last one of the recordset. Added by Iv�n Oliva to provide recordset pagination. |
|
2377 | - * |
|
2378 | - * @param secs2cache seconds to cache data, set to 0 to force query |
|
2379 | - * @param sql |
|
2380 | - * @param nrows is the number of rows per page to get |
|
2381 | - * @param page is the page number to get (1-based) |
|
2382 | - * @param [inputarr] array of bind variables |
|
2383 | - * @return the recordset ($rs->databaseType == 'array') |
|
2384 | - */ |
|
2373 | + * Will select the supplied $page number from a recordset, given that it is paginated in pages of |
|
2374 | + * $nrows rows per page. It also saves two boolean values saying if the given page is the first |
|
2375 | + * and/or last one of the recordset. Added by Iv�n Oliva to provide recordset pagination. |
|
2376 | + * |
|
2377 | + * @param secs2cache seconds to cache data, set to 0 to force query |
|
2378 | + * @param sql |
|
2379 | + * @param nrows is the number of rows per page to get |
|
2380 | + * @param page is the page number to get (1-based) |
|
2381 | + * @param [inputarr] array of bind variables |
|
2382 | + * @return the recordset ($rs->databaseType == 'array') |
|
2383 | + */ |
|
2385 | 2384 | function &CachePageExecute($secs2cache, $sql, $nrows, $page,$inputarr=false) |
2386 | 2385 | { |
2387 | 2386 | /*switch($this->dataProvider) { |
@@ -2403,8 +2402,8 @@ discard block |
||
2403 | 2402 | //============================================================================================== |
2404 | 2403 | |
2405 | 2404 | /** |
2406 | - * Internal placeholder for record objects. Used by ADORecordSet->FetchObj(). |
|
2407 | - */ |
|
2405 | + * Internal placeholder for record objects. Used by ADORecordSet->FetchObj(). |
|
2406 | + */ |
|
2408 | 2407 | class ADOFetchObj { |
2409 | 2408 | }; |
2410 | 2409 | |
@@ -2413,8 +2412,8 @@ discard block |
||
2413 | 2412 | //============================================================================================== |
2414 | 2413 | |
2415 | 2414 | /** |
2416 | - * Lightweight recordset when there are no records to be returned |
|
2417 | - */ |
|
2415 | + * Lightweight recordset when there are no records to be returned |
|
2416 | + */ |
|
2418 | 2417 | class ADORecordSet_empty |
2419 | 2418 | { |
2420 | 2419 | var $dataProvider = 'empty'; |
@@ -2444,11 +2443,11 @@ discard block |
||
2444 | 2443 | if (PHP_VERSION < 5) include_once(ADODB_DIR.'/adodb-php4.inc.php'); |
2445 | 2444 | else include_once(ADODB_DIR.'/adodb-iterator.inc.php'); |
2446 | 2445 | /** |
2447 | - * RecordSet class that represents the dataset returned by the database. |
|
2448 | - * To keep memory overhead low, this class holds only the current row in memory. |
|
2449 | - * No prefetching of data is done, so the RecordCount() can return -1 ( which |
|
2450 | - * means recordcount not known). |
|
2451 | - */ |
|
2446 | + * RecordSet class that represents the dataset returned by the database. |
|
2447 | + * To keep memory overhead low, this class holds only the current row in memory. |
|
2448 | + * No prefetching of data is done, so the RecordCount() can return -1 ( which |
|
2449 | + * means recordcount not known). |
|
2450 | + */ |
|
2452 | 2451 | class ADORecordSet extends ADODB_BASE_RS { |
2453 | 2452 | /* |
2454 | 2453 | * public variables |
@@ -2809,8 +2808,8 @@ discard block |
||
2809 | 2808 | |
2810 | 2809 | |
2811 | 2810 | /** |
2812 | - * PEAR DB Compat - do not use internally |
|
2813 | - */ |
|
2811 | + * PEAR DB Compat - do not use internally |
|
2812 | + */ |
|
2814 | 2813 | function Free() |
2815 | 2814 | { |
2816 | 2815 | return $this->Close(); |
@@ -2818,8 +2817,8 @@ discard block |
||
2818 | 2817 | |
2819 | 2818 | |
2820 | 2819 | /** |
2821 | - * PEAR DB compat, number of rows |
|
2822 | - */ |
|
2820 | + * PEAR DB compat, number of rows |
|
2821 | + */ |
|
2823 | 2822 | function NumRows() |
2824 | 2823 | { |
2825 | 2824 | return $this->_numOfRows; |
@@ -2827,19 +2826,19 @@ discard block |
||
2827 | 2826 | |
2828 | 2827 | |
2829 | 2828 | /** |
2830 | - * PEAR DB compat, number of cols |
|
2831 | - */ |
|
2829 | + * PEAR DB compat, number of cols |
|
2830 | + */ |
|
2832 | 2831 | function NumCols() |
2833 | 2832 | { |
2834 | 2833 | return $this->_numOfFields; |
2835 | 2834 | } |
2836 | 2835 | |
2837 | 2836 | /** |
2838 | - * Fetch a row, returning false if no more rows. |
|
2839 | - * This is PEAR DB compat mode. |
|
2840 | - * |
|
2841 | - * @return false or array containing the current record |
|
2842 | - */ |
|
2837 | + * Fetch a row, returning false if no more rows. |
|
2838 | + * This is PEAR DB compat mode. |
|
2839 | + * |
|
2840 | + * @return false or array containing the current record |
|
2841 | + */ |
|
2843 | 2842 | function &FetchRow() |
2844 | 2843 | { |
2845 | 2844 | if ($this->EOF) { |
@@ -2854,11 +2853,11 @@ discard block |
||
2854 | 2853 | |
2855 | 2854 | |
2856 | 2855 | /** |
2857 | - * Fetch a row, returning PEAR_Error if no more rows. |
|
2858 | - * This is PEAR DB compat mode. |
|
2859 | - * |
|
2860 | - * @return DB_OK or error object |
|
2861 | - */ |
|
2856 | + * Fetch a row, returning PEAR_Error if no more rows. |
|
2857 | + * This is PEAR DB compat mode. |
|
2858 | + * |
|
2859 | + * @return DB_OK or error object |
|
2860 | + */ |
|
2862 | 2861 | function FetchInto(&$arr) |
2863 | 2862 | { |
2864 | 2863 | if ($this->EOF) return (defined('PEAR_ERROR_RETURN')) ? new PEAR_Error('EOF',-1): false; |
@@ -3064,13 +3063,13 @@ discard block |
||
3064 | 3063 | |
3065 | 3064 | |
3066 | 3065 | /** |
3067 | - * Portable RecordCount. Pablo Roca <[email protected]> |
|
3068 | - * |
|
3069 | - * @return the number of records from a previous SELECT. All databases support this. |
|
3070 | - * |
|
3071 | - * But aware possible problems in multiuser environments. For better speed the table |
|
3072 | - * must be indexed by the condition. Heavy test this before deploying. |
|
3073 | - */ |
|
3066 | + * Portable RecordCount. Pablo Roca <[email protected]> |
|
3067 | + * |
|
3068 | + * @return the number of records from a previous SELECT. All databases support this. |
|
3069 | + * |
|
3070 | + * But aware possible problems in multiuser environments. For better speed the table |
|
3071 | + * must be indexed by the condition. Heavy test this before deploying. |
|
3072 | + */ |
|
3074 | 3073 | function PO_RecordCount($table="", $condition="") { |
3075 | 3074 | |
3076 | 3075 | $lnumrows = $this->_numOfRows; |
@@ -3129,11 +3128,11 @@ discard block |
||
3129 | 3128 | } |
3130 | 3129 | |
3131 | 3130 | /** |
3132 | - * Return the fields array of the current row as an object for convenience. |
|
3133 | - * The default case is lowercase field names. |
|
3134 | - * |
|
3135 | - * @return the object with the properties set to the fields of the current row |
|
3136 | - */ |
|
3131 | + * Return the fields array of the current row as an object for convenience. |
|
3132 | + * The default case is lowercase field names. |
|
3133 | + * |
|
3134 | + * @return the object with the properties set to the fields of the current row |
|
3135 | + */ |
|
3137 | 3136 | function &FetchObj() |
3138 | 3137 | { |
3139 | 3138 | $o =& $this->FetchObject(false); |
@@ -3141,13 +3140,13 @@ discard block |
||
3141 | 3140 | } |
3142 | 3141 | |
3143 | 3142 | /** |
3144 | - * Return the fields array of the current row as an object for convenience. |
|
3145 | - * The default case is uppercase. |
|
3146 | - * |
|
3147 | - * @param $isupper to set the object property names to uppercase |
|
3148 | - * |
|
3149 | - * @return the object with the properties set to the fields of the current row |
|
3150 | - */ |
|
3143 | + * Return the fields array of the current row as an object for convenience. |
|
3144 | + * The default case is uppercase. |
|
3145 | + * |
|
3146 | + * @param $isupper to set the object property names to uppercase |
|
3147 | + * |
|
3148 | + * @return the object with the properties set to the fields of the current row |
|
3149 | + */ |
|
3151 | 3150 | function &FetchObject($isupper=true) |
3152 | 3151 | { |
3153 | 3152 | if (empty($this->_obj)) { |
@@ -3173,14 +3172,14 @@ discard block |
||
3173 | 3172 | } |
3174 | 3173 | |
3175 | 3174 | /** |
3176 | - * Return the fields array of the current row as an object for convenience. |
|
3177 | - * The default is lower-case field names. |
|
3178 | - * |
|
3179 | - * @return the object with the properties set to the fields of the current row, |
|
3180 | - * or false if EOF |
|
3181 | - * |
|
3182 | - * Fixed bug reported by [email protected] |
|
3183 | - */ |
|
3175 | + * Return the fields array of the current row as an object for convenience. |
|
3176 | + * The default is lower-case field names. |
|
3177 | + * |
|
3178 | + * @return the object with the properties set to the fields of the current row, |
|
3179 | + * or false if EOF |
|
3180 | + * |
|
3181 | + * Fixed bug reported by [email protected] |
|
3182 | + */ |
|
3184 | 3183 | function &FetchNextObj() |
3185 | 3184 | { |
3186 | 3185 | $o =& $this->FetchNextObject(false); |
@@ -3189,16 +3188,16 @@ discard block |
||
3189 | 3188 | |
3190 | 3189 | |
3191 | 3190 | /** |
3192 | - * Return the fields array of the current row as an object for convenience. |
|
3193 | - * The default is upper case field names. |
|
3194 | - * |
|
3195 | - * @param $isupper to set the object property names to uppercase |
|
3196 | - * |
|
3197 | - * @return the object with the properties set to the fields of the current row, |
|
3198 | - * or false if EOF |
|
3199 | - * |
|
3200 | - * Fixed bug reported by [email protected] |
|
3201 | - */ |
|
3191 | + * Return the fields array of the current row as an object for convenience. |
|
3192 | + * The default is upper case field names. |
|
3193 | + * |
|
3194 | + * @param $isupper to set the object property names to uppercase |
|
3195 | + * |
|
3196 | + * @return the object with the properties set to the fields of the current row, |
|
3197 | + * or false if EOF |
|
3198 | + * |
|
3199 | + * Fixed bug reported by [email protected] |
|
3200 | + */ |
|
3202 | 3201 | function &FetchNextObject($isupper=true) |
3203 | 3202 | { |
3204 | 3203 | $o = false; |
@@ -3234,7 +3233,7 @@ discard block |
||
3234 | 3233 | * R for autoincrement counter/integer |
3235 | 3234 | * |
3236 | 3235 | * |
3237 | - */ |
|
3236 | + */ |
|
3238 | 3237 | function MetaType($t,$len=-1,$fieldobj=false) |
3239 | 3238 | { |
3240 | 3239 | if (is_object($t)) { |