erosszz
08-24-2007, 02:06 AM
<?php
//clsrecordset.php
class Recordset extends Database{
public function Recordset( ) { }
public function query( ) { }
public function endOfFile ( ) { }
}
?>
<?php
//clssearchindex.php
require_once('clsrecordset.php');
class Searchindex {
private c_rs;
public function Searchindex ( ) {
$this->c_rs = new Recordset( );
}
public function getSQL ( ) { }
public function getData ( ) {
$rs = $this->c_rs->query($this->getSQL()); // error occurred this line
$this->c_rs->query($this->getSQL());
if ( $this->c_rs->endOfFile() ) {
$norecs = true;
}
}
}
?>
Error message: Call to a member function query() on a non-object
Additional, when I type the $this->c_rs-> , there is no intellisense on this case that's why I know there is something wrong and couldn't find the function.
Help: How can I call the function from the initiated class in order to use in other class?
//clsrecordset.php
class Recordset extends Database{
public function Recordset( ) { }
public function query( ) { }
public function endOfFile ( ) { }
}
?>
<?php
//clssearchindex.php
require_once('clsrecordset.php');
class Searchindex {
private c_rs;
public function Searchindex ( ) {
$this->c_rs = new Recordset( );
}
public function getSQL ( ) { }
public function getData ( ) {
$rs = $this->c_rs->query($this->getSQL()); // error occurred this line
$this->c_rs->query($this->getSQL());
if ( $this->c_rs->endOfFile() ) {
$norecs = true;
}
}
}
?>
Error message: Call to a member function query() on a non-object
Additional, when I type the $this->c_rs-> , there is no intellisense on this case that's why I know there is something wrong and couldn't find the function.
Help: How can I call the function from the initiated class in order to use in other class?