source: trunk/phpgwapi/inc/adodb/drivers/adodb-odbtp.inc.php @ 2

Revision 2, 17.7 KB checked in by niltonneto, 17 years ago (diff)

Removida todas as tags usadas pelo CVS ($Id, $Source).
Primeira versão no CVS externo.

  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
1<?php
2/*
3V4.51 29 July 2004  (c) 2000-2004 John Lim (jlim@natsoft.com.my). All rights reserved.
4  Released under both BSD license and Lesser GPL library license.
5  Whenever there is any discrepancy between the two licenses,
6  the BSD license will take precedence. See License.txt.
7  Set tabs to 4 for best viewing.
8  Latest version is available at http://adodb.sourceforge.net
9*/
10// Code contributed by "stefan bogdan" <sbogdan#rsb.ro>
11
12// security - hide paths
13if (!defined('ADODB_DIR')) die();
14
15define("_ADODB_ODBTP_LAYER", 2 );
16
17class ADODB_odbtp extends ADOConnection{
18        var $databaseType = "odbtp";
19        var $dataProvider = "odbtp";
20        var $fmtDate = "'Y-m-d'";
21        var $fmtTimeStamp = "'Y-m-d, h:i:sA'";
22        var $replaceQuote = "''"; // string to use to replace quotes
23        var $odbc_driver = 0;
24        var $hasAffectedRows = true;
25        var $hasInsertID = false;
26        var $hasGenID = true;
27        var $hasMoveFirst = true;
28
29        var $_genSeqSQL = "create table %s (seq_name char(30) not null unique , seq_value integer not null)";
30        var $_dropSeqSQL = "delete from adodb_seq where seq_name = '%s'";
31        var $_autocommit = true;
32        var $_bindInputArray = false;
33        var $_useUnicodeSQL = false;
34        var $_canPrepareSP = false;
35
36        function ADODB_odbtp()
37        {
38        }
39
40        function ServerInfo()
41        {
42                return array('description' => @odbtp_get_attr( ODB_ATTR_DBMSNAME, $this->_connectionID),
43                             'version' => @odbtp_get_attr( ODB_ATTR_DBMSVER, $this->_connectionID));
44        }
45
46        function ErrorMsg()
47        {
48                if (empty($this->_connectionID)) return @odbtp_last_error();
49                return @odbtp_last_error($this->_connectionID);
50        }
51
52        function ErrorNo()
53        {
54                if (empty($this->_connectionID)) return @odbtp_last_error_state();
55                        return @odbtp_last_error_state($this->_connectionID);
56        }
57
58        function _insertid()
59        {
60        // SCOPE_IDENTITY()
61        // Returns the last IDENTITY value inserted into an IDENTITY column in
62        // the same scope. A scope is a module -- a stored procedure, trigger,
63        // function, or batch. Thus, two statements are in the same scope if
64        // they are in the same stored procedure, function, or batch.
65                        return $this->GetOne($this->identitySQL);
66        }
67
68        function _affectedrows()
69        {
70                if ($this->_queryID) {
71                        return @odbtp_affected_rows ($this->_queryID);
72           } else
73                return 0;
74        }
75
76        function CreateSequence($seqname='adodbseq',$start=1)
77        {
78                //verify existence
79                $num = $this->GetOne("select seq_value from adodb_seq");
80                $seqtab='adodb_seq';
81                if( $this->odbc_driver == ODB_DRIVER_FOXPRO ) {
82                        $path = @odbtp_get_attr( ODB_ATTR_DATABASENAME, $this->_connectionID );
83                        //if using vfp dbc file
84                        if( !strcasecmp(strrchr($path, '.'), '.dbc') )
85                $path = substr($path,0,strrpos($path,'\/'));
86                $seqtab = $path . '/' . $seqtab;
87        }
88                if($num == false) {
89                        if (empty($this->_genSeqSQL)) return false;
90                        $ok = $this->Execute(sprintf($this->_genSeqSQL ,$seqtab));
91                }
92                $num = $this->GetOne("select seq_value from adodb_seq where seq_name='$seqname'");
93                if ($num) {
94                        return false;
95                }
96                $start -= 1;
97                return $this->Execute("insert into adodb_seq values('$seqname',$start)");
98        }
99
100        function DropSequence($seqname)
101        {
102                if (empty($this->_dropSeqSQL)) return false;
103                return $this->Execute(sprintf($this->_dropSeqSQL,$seqname));
104        }
105
106        function GenID($seq='adodbseq',$start=1)
107        {
108                $seqtab='adodb_seq';
109                if( $this->odbc_driver == ODB_DRIVER_FOXPRO ) {
110                        $path = @odbtp_get_attr( ODB_ATTR_DATABASENAME, $this->_connectionID );
111                        //if using vfp dbc file
112                        if( !strcasecmp(strrchr($path, '.'), '.dbc') )
113                $path = substr($path,0,strrpos($path,'\/'));
114                $seqtab = $path . '/' . $seqtab;
115        }
116                $MAXLOOPS = 100;
117                while (--$MAXLOOPS>=0) {
118                        $num = $this->GetOne("select seq_value from adodb_seq where seq_name='$seq'");
119                        if ($num === false) {
120                                //verify if abodb_seq table exist
121                                $ok = $this->GetOne("select seq_value from adodb_seq ");
122                                if(!$ok) {
123                                        //creating the sequence table adodb_seq
124                                        $this->Execute(sprintf($this->_genSeqSQL ,$seqtab));
125                                }
126                                $start -= 1;
127                                $num = '0';
128                                $ok = $this->Execute("insert into adodb_seq values('$seq',$start)");
129                                if (!$ok) return false;
130                        }
131                        $ok = $this->Execute("update adodb_seq set seq_value=seq_value+1 where seq_name='$seq'");
132                        if($ok) {
133                                $num += 1;
134                                $this->genID = $num;
135                                return $num;
136                        }
137                }
138        if ($fn = $this->raiseErrorFn) {
139                $fn($this->databaseType,'GENID',-32000,"Unable to generate unique id after $MAXLOOPS attempts",$seq,$num);
140        }
141                return false;
142        }
143
144        //example for $UserOrDSN
145        //for visual fox : DRIVER={Microsoft Visual FoxPro Driver};SOURCETYPE=DBF;SOURCEDB=c:\YourDbfFileDir;EXCLUSIVE=NO;
146        //for visual fox dbc: DRIVER={Microsoft Visual FoxPro Driver};SOURCETYPE=DBC;SOURCEDB=c:\YourDbcFileDir\mydb.dbc;EXCLUSIVE=NO;
147        //for access : DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:\path_to_access_db\base_test.mdb;UID=root;PWD=;
148        //for mssql : DRIVER={SQL Server};SERVER=myserver;UID=myuid;PWD=mypwd;DATABASE=OdbtpTest;
149        //if uid & pwd can be separate
150    function _connect($HostOrInterface, $UserOrDSN='', $argPassword='', $argDatabase='')
151        {
152                $this->_connectionID = @odbtp_connect($HostOrInterface,$UserOrDSN,$argPassword,$argDatabase);
153                if ($this->_connectionID === false)
154                {
155                        $this->_errorMsg = $this->ErrorMsg() ;
156                        return false;
157                }
158                $this->odbc_driver = @odbtp_get_attr(ODB_ATTR_DRIVER, $this->_connectionID);
159
160                // Set driver specific attributes
161                switch( $this->odbc_driver ) {
162                        case ODB_DRIVER_MSSQL:
163                                $this->fmtDate = "'Y-m-d'";
164                                $this->fmtTimeStamp = "'Y-m-d h:i:sA'";
165                                $this->sysDate = 'convert(datetime,convert(char,GetDate(),102),102)';
166                                $this->sysTimeStamp = 'GetDate()';
167                                $this->ansiOuter = true;
168                                $this->leftOuter = '*=';
169                                $this->rightOuter = '=*';
170                $this->hasTop = 'top';
171                                $this->hasInsertID = true;
172                                $this->hasTransactions = true;
173                                $this->_bindInputArray = true;
174                                $this->_canSelectDb = true;
175                                $this->substr = "substring";
176                                $this->length = 'len';
177                                $this->identitySQL = 'select @@IDENTITY';
178                                $this->metaDatabasesSQL = "select name from master..sysdatabases where name <> 'master'";
179                                break;
180                        case ODB_DRIVER_JET:
181                                $this->fmtDate = "#Y-m-d#";
182                                $this->fmtTimeStamp = "#Y-m-d h:i:sA#";
183                                $this->sysDate = "FORMAT(NOW,'yyyy-mm-dd')";
184                                $this->sysTimeStamp = 'NOW';
185                $this->hasTop = 'top';
186                                $this->hasTransactions = false;
187                                $this->_canPrepareSP = true;  // For MS Access only.
188
189                                // Can't rebind ODB_CHAR to ODB_WCHAR if row cache enabled.
190                                if ($this->_useUnicodeSQL)
191                                        odbtp_use_row_cache($this->_connectionID, FALSE, 0);
192                                break;
193                        case ODB_DRIVER_FOXPRO:
194                                $this->fmtDate = "{^Y-m-d}";
195                                $this->fmtTimeStamp = "{^Y-m-d, h:i:sA}";
196                                $this->sysDate = 'date()';
197                                $this->sysTimeStamp = 'datetime()';
198                                $this->ansiOuter = true;
199                $this->hasTop = 'top';
200                        $this->hasTransactions = false;
201                                $this->replaceQuote = "'+chr(39)+'";
202                                $this->true = '.T.';
203                                $this->false = '.F.';
204                                break;
205                        case ODB_DRIVER_ORACLE:
206                                $this->fmtDate = "'Y-m-d 00:00:00'";
207                                $this->fmtTimeStamp = "'Y-m-d h:i:sA'";
208                                $this->sysDate = 'TRUNC(SYSDATE)';
209                                $this->sysTimeStamp = 'SYSDATE';
210                                $this->hasTransactions = true;
211                                $this->_bindInputArray = true;
212                                $this->concat_operator = '||';
213                                break;
214                        case ODB_DRIVER_SYBASE:
215                                $this->fmtDate = "'Y-m-d'";
216                                $this->fmtTimeStamp = "'Y-m-d H:i:s'";
217                                $this->sysDate = 'GetDate()';
218                                $this->sysTimeStamp = 'GetDate()';
219                                $this->leftOuter = '*=';
220                                $this->rightOuter = '=*';
221                                $this->hasInsertID = true;
222                                $this->hasTransactions = true;
223                                $this->identitySQL = 'select @@IDENTITY';
224                                break;
225                        default:
226                                if( @odbtp_get_attr(ODB_ATTR_TXNCAPABLE, $this->_connectionID) )
227                        $this->hasTransactions = true;
228                                else
229                                        $this->hasTransactions = false;
230                }
231        @odbtp_set_attr(ODB_ATTR_FULLCOLINFO, TRUE, $this->_connectionID );
232                if ($this->_useUnicodeSQL )
233                        @odbtp_set_attr(ODB_ATTR_UNICODESQL, TRUE, $this->_connectionID);
234        return true;
235        }
236       
237        function _pconnect($HostOrInterface, $UserOrDSN='', $argPassword='', $argDatabase='')
238        {
239                return $this->_connect($HostOrInterface, $UserOrDSN, $argPassword, $argDatabase);
240        }
241       
242        function SelectDB($dbName)
243        {
244                if (!@odbtp_select_db($dbName, $this->_connectionID)) {
245                        return false;
246                }
247                $this->databaseName = $dbName;
248                return true;
249        }
250       
251        function &MetaTables($ttype='',$showSchema=false,$mask=false)
252        {
253        global $ADODB_FETCH_MODE;
254
255                $savem = $ADODB_FETCH_MODE;
256                $ADODB_FETCH_MODE = ADODB_FETCH_NUM;
257                $arr =& $this->GetArray("||SQLTables||||$ttype");
258                $ADODB_FETCH_MODE = $savem;
259
260                $arr2 = array();
261                for ($i=0; $i < sizeof($arr); $i++) {
262                        if ($arr[$i][3] == 'SYSTEM TABLE' )     continue;
263                        if ($arr[$i][2])
264                                $arr2[] = $showSchema ? $arr[$i][1].'.'.$arr[$i][2] : $arr[$i][2];
265                }
266                return $arr2;
267        }
268       
269        function &MetaColumns($table,$upper=true)
270        {
271        global $ADODB_FETCH_MODE;
272
273                $schema = false;
274                $this->_findschema($table,$schema);
275                if ($upper) $table = strtoupper($table);
276
277                $savem = $ADODB_FETCH_MODE;
278                $ADODB_FETCH_MODE = ADODB_FETCH_NUM;
279                $rs = $this->Execute( "||SQLColumns||$schema|$table" );
280                $ADODB_FETCH_MODE = $savem;
281
282                if (!$rs) return false;
283               
284                while (!$rs->EOF) {
285                        //print_r($rs->fields);
286                        if (strtoupper($rs->fields[2]) == $table) {
287                                $fld = new ADOFieldObject();
288                                $fld->name = $rs->fields[3];
289                                $fld->type = $rs->fields[5];
290                                $fld->max_length = $rs->fields[6];
291                        $fld->not_null = !empty($rs->fields[9]);
292                                $fld->scale = $rs->fields[7];
293                                if (!is_null($rs->fields[12])) {
294                                        $fld->has_default = true;
295                                        $fld->default_value = $rs->fields[12];
296                                }
297                                $retarr[strtoupper($fld->name)] = $fld;
298                        } else if (sizeof($retarr)>0)
299                                break;
300                        $rs->MoveNext();
301                }
302                $rs->Close();
303
304                return $retarr;
305        }
306
307        function &MetaPrimaryKeys($table, $owner='')
308        {
309        global $ADODB_FETCH_MODE;
310
311                $savem = $ADODB_FETCH_MODE;
312                $ADODB_FETCH_MODE = ADODB_FETCH_NUM;
313                $arr =& $this->GetArray("||SQLPrimaryKeys||$owner|$table");
314                $ADODB_FETCH_MODE = $savem;
315
316                //print_r($arr);
317                $arr2 = array();
318                for ($i=0; $i < sizeof($arr); $i++) {
319                        if ($arr[$i][3]) $arr2[] = $arr[$i][3];
320                }
321                return $arr2;
322        }
323
324        function &MetaForeignKeys($table, $owner='', $upper=false)
325        {
326        global $ADODB_FETCH_MODE;
327
328                $savem = $ADODB_FETCH_MODE;
329                $ADODB_FETCH_MODE = ADODB_FETCH_NUM;
330                $constraints =& $this->GetArray("||SQLForeignKeys|||||$owner|$table");
331                $ADODB_FETCH_MODE = $savem;
332
333                $arr = false;
334                foreach($constraints as $constr) {
335                        //print_r($constr);
336                        $arr[$constr[11]][$constr[2]][] = $constr[7].'='.$constr[3];
337                }
338                if (!$arr) return false;
339
340                $arr2 = array();
341
342                foreach($arr as $k => $v) {
343                        foreach($v as $a => $b) {
344                                if ($upper) $a = strtoupper($a);
345                                $arr2[$a] = $b;
346                        }
347                }
348                return $arr2;
349        }
350
351        function BeginTrans()
352        {
353                if (!$this->hasTransactions) return false;
354                if ($this->transOff) return true;
355                $this->transCnt += 1;
356                $this->_autocommit = false;
357                $rs = @odbtp_set_attr(ODB_ATTR_TRANSACTIONS,ODB_TXN_READUNCOMMITTED,$this->_connectionID);
358                if(!$rs) return false;
359                else return true;
360        }
361
362        function CommitTrans($ok=true)
363        {
364                if ($this->transOff) return true;
365                if (!$ok) return $this->RollbackTrans();
366                if ($this->transCnt) $this->transCnt -= 1;
367                $this->_autocommit = true;
368                if( ($ret = odbtp_commit($this->_connectionID)) )
369                        $ret = @odbtp_set_attr(ODB_ATTR_TRANSACTIONS, ODB_TXN_NONE, $this->_connectionID);//set transaction off
370                return $ret;
371        }
372
373        function RollbackTrans()
374        {
375                if ($this->transOff) return true;
376                if ($this->transCnt) $this->transCnt -= 1;
377                $this->_autocommit = true;
378                if( ($ret = odbtp_rollback($this->_connectionID)) )
379                        $ret = @odbtp_set_attr(ODB_ATTR_TRANSACTIONS, ODB_TXN_NONE, $this->_connectionID);//set transaction off
380                return $ret;
381        }
382
383        function &SelectLimit($sql,$nrows=-1,$offset=-1, $inputarr=false,$secs2cache=0)
384        {
385                // TOP requires ORDER BY for Visual FoxPro
386                if( $this->odbc_driver == ODB_DRIVER_FOXPRO ) {
387                        if (!preg_match('/ORDER[ \t\r\n]+BY/is',$sql)) $sql .= ' ORDER BY 1';
388                }
389                return ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache);
390        }
391
392        function Prepare($sql)
393        {
394                if (! $this->_bindInputArray) return $sql; // no binding
395                $stmt = odbtp_prepare($sql,$this->_connectionID);
396                if (!$stmt) {
397                //      print "Prepare Error for ($sql) ".$this->ErrorMsg()."<br>";
398                        return $sql;
399                }
400                return array($sql,$stmt,false);
401        }
402
403        function PrepareSP($sql)
404        {
405                if (!$this->_canPrepareSP) return $sql; // Can't prepare procedures
406
407                $stmt = odbtp_prepare_proc($sql,$this->_connectionID);
408                if (!$stmt) return false;
409                return array($sql,$stmt);
410        }
411
412        /*
413        Usage:
414                $stmt = $db->PrepareSP('SP_RUNSOMETHING'); -- takes 2 params, @myid and @group
415
416                # note that the parameter does not have @ in front!
417                $db->Parameter($stmt,$id,'myid');
418                $db->Parameter($stmt,$group,'group',false,64);
419                $db->Parameter($stmt,$group,'photo',false,100000,ODB_BINARY);
420                $db->Execute($stmt);
421
422                @param $stmt Statement returned by Prepare() or PrepareSP().
423                @param $var PHP variable to bind to. Can set to null (for isNull support).
424                @param $name Name of stored procedure variable name to bind to.
425                @param [$isOutput] Indicates direction of parameter 0/false=IN  1=OUT  2= IN/OUT. This is ignored in odbtp.
426                @param [$maxLen] Holds an maximum length of the variable.
427                @param [$type] The data type of $var. Legal values depend on driver.
428
429                See odbtp_attach_param documentation at http://odbtp.sourceforge.net.
430        */
431        function Parameter(&$stmt, &$var, $name, $isOutput=false, $maxLen=0, $type=0)
432        {
433                if ( $this->odbc_driver == ODB_DRIVER_JET ) {
434                        $name = '['.$name.']';
435                        if( !$type && $this->_useUnicodeSQL
436                                && @odbtp_param_bindtype($stmt[1], $name) == ODB_CHAR )
437                        {
438                                $type = ODB_WCHAR;
439                        }
440                }
441                else {
442                        $name = '@'.$name;
443                }
444                return odbtp_attach_param($stmt[1], $name, $var, $type, $maxLen);
445        }
446
447        /*
448                Insert a null into the blob field of the table first.
449                Then use UpdateBlob to store the blob.
450
451                Usage:
452
453                $conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)');
454                $conn->UpdateBlob('blobtable','blobcol',$blob,'id=1');
455        */
456
457        function UpdateBlob($table,$column,$val,$where,$blobtype='image')
458        {
459                $sql = "UPDATE $table SET $column = ? WHERE $where";
460                if( !($stmt = odbtp_prepare($sql, $this->_connectionID)) )
461                        return false;
462                if( !odbtp_input( $stmt, 1, ODB_BINARY, 1000000, $blobtype ) )
463                        return false;
464                if( !odbtp_set( $stmt, 1, $val ) )
465                        return false;
466                return odbtp_execute( $stmt ) != false;
467        }
468
469        function IfNull( $field, $ifNull )
470        {
471                switch( $this->odbc_driver ) {
472                        case ODB_DRIVER_MSSQL:
473                                return " ISNULL($field, $ifNull) ";
474                        case ODB_DRIVER_JET:
475                                return " IIF(IsNull($field), $ifNull, $field) ";
476                }
477                return " CASE WHEN $field is null THEN $ifNull ELSE $field END ";
478        }
479
480        function _query($sql,$inputarr=false)
481        {
482                if ($inputarr) {
483                        if (is_array($sql)) {
484                                $stmtid = $sql[1];
485                        } else {
486                                $stmtid = odbtp_prepare($sql,$this->_connectionID);
487                                if ($stmtid == false) {
488                                        $this->_errorMsg = $php_errormsg;
489                                        return false;
490                                }
491                        }
492                        $num_params = odbtp_num_params( $stmtid );
493                        for( $param = 1; $param <= $num_params; $param++ ) {
494                                @odbtp_input( $stmtid, $param );
495                                @odbtp_set( $stmtid, $param, $inputarr[$param-1] );
496                        }
497                        if (! odbtp_execute($stmtid) ) {
498                                return false;
499                        }
500                } else if (is_array($sql)) {
501                        $stmtid = $sql[1];
502                        if (!odbtp_execute($stmtid)) {
503                                return false;
504                        }
505                } else {
506                        $stmtid = @odbtp_query($sql,$this->_connectionID);
507                }
508                $this->_lastAffectedRows = 0;
509                if ($stmtid) {
510                                $this->_lastAffectedRows = @odbtp_affected_rows($stmtid);
511                }
512        return $stmtid;
513        }
514
515        function _close()
516        {
517                $ret = @odbtp_close($this->_connectionID);
518                $this->_connectionID = false;
519                return $ret;
520        }
521}
522
523class ADORecordSet_odbtp extends ADORecordSet {
524
525        var $databaseType = 'odbtp';
526        var $canSeek = true;
527
528        function ADORecordSet_odbtp($queryID,$mode=false)
529        {
530                if ($mode === false) {
531                        global $ADODB_FETCH_MODE;
532                        $mode = $ADODB_FETCH_MODE;
533                }
534                $this->fetchMode = $mode;
535                $this->ADORecordSet($queryID);
536        }
537
538        function _initrs()
539        {
540                $this->_numOfFields = @odbtp_num_fields($this->_queryID);
541                if (!($this->_numOfRows = @odbtp_num_rows($this->_queryID)))
542                        $this->_numOfRows = -1;
543        }
544
545        function &FetchField($fieldOffset = 0)
546        {
547                $off=$fieldOffset; // offsets begin at 0
548                $o= new ADOFieldObject();
549                $o->name = @odbtp_field_name($this->_queryID,$off);
550                $o->type = @odbtp_field_type($this->_queryID,$off);
551        $o->max_length = @odbtp_field_length($this->_queryID,$off);
552                if (ADODB_ASSOC_CASE == 0) $o->name = strtolower($o->name);
553                else if (ADODB_ASSOC_CASE == 1) $o->name = strtoupper($o->name);
554                return $o;
555        }
556
557        function _seek($row)
558        {
559                return @odbtp_data_seek($this->_queryID, $row);
560        }
561
562        function fields($colname)
563        {
564                if ($this->fetchMode & ADODB_FETCH_ASSOC) return $this->fields[$colname];
565
566                if (!$this->bind) {
567                        $this->bind = array();
568                        for ($i=0; $i < $this->_numOfFields; $i++) {
569                                $name = @odbtp_field_name( $this->_queryID, $i );
570                                $this->bind[strtoupper($name)] = $i;
571                        }
572                }
573                 return $this->fields[$this->bind[strtoupper($colname)]];
574        }
575
576        function _fetch_odbtp($type=0)
577        {
578                switch ($this->fetchMode) {
579                        case ADODB_FETCH_NUM:
580                                $this->fields = @odbtp_fetch_row($this->_queryID, $type);
581                                break;
582                        case ADODB_FETCH_ASSOC:
583                                $this->fields = @odbtp_fetch_assoc($this->_queryID, $type);
584                                break;
585            default:
586                                $this->fields = @odbtp_fetch_array($this->_queryID, $type);
587                }
588                return is_array($this->fields);
589        }
590
591        function _fetch()
592        {
593                return $this->_fetch_odbtp();
594        }
595
596        function MoveFirst()
597        {
598                if (!$this->_fetch_odbtp(ODB_FETCH_FIRST)) return false;
599                $this->EOF = false;
600          $this->_currentRow = 0;
601          return true;
602    }
603
604    function MoveLast()
605   {
606                if (!$this->_fetch_odbtp(ODB_FETCH_LAST)) return false;
607                $this->EOF = false;
608                $this->_currentRow = $this->_numOfRows - 1;
609          return true;
610    }
611   
612        function NextRecordSet()
613        {
614                if (!@odbtp_next_result($this->_queryID)) return false;
615                $this->_inited = false;
616                $this->bind = false;
617                $this->_currentRow = -1;
618                $this->Init();
619                return true;
620        }
621
622        function _close()
623        {
624                return @odbtp_free_query($this->_queryID);
625        }
626}
627
628?>
Note: See TracBrowser for help on using the repository browser.