PHP database objects for a ODBC/Access??

[email protected] ("Christian C.") Mon, 8 Oct 2001 13:56:19 -0300
Newsgroups php.lang
Message-ID <[email protected]>
Hello :c)

I have found a class for odbc database connectivity and im tring to make it
work...

but im getting a Undefined property error :
Warning: Undefined property: num_rows in c:\inetpub\wwwroot\dbodbc.php on
line 43

In my case line 43 is this: $this->num_rows += 1;

Why is that and how could i fix it??
From what i could see, num_rows is defined in my class but it's still not
working.

Any one know a good easy and fast PHP database objects for ODBC??

<?
class odbc {
 /* Set connection variables */
 var $record_set, $con_nect, $cur_sur, $dbtype, $num_rows, $current_rec,
$cur_field, $current_row;

 /* Create an object to set the cursor of the database */
 function cursorname($cursor){
 $this->cur=$cursor;
}
...
function openrs($sqlstatement){
//var num_rows;
    $this->record_set = odbc_exec($this->con_nek,$sqlstatement); /* get the
result */
 while (odbc_fetch_row($this->record_set)){
        $this->num_rows += 1; /* count the number of rows */
  }
     $this->current_rec = odbc_fetch_row($this->record_set,1);  /* gets the
current row */
     $this->current_row = 1; /* reset row (first row) */
     return $this->record_set;
}
?>

Thanks
--
Merci
Christian Charette
www.charetx2.com