[PHP]
<?php
//clsrecordset.ph p
class Recordset extends Database{
public function Recordset( ) { }
public function query( ) { }
public function endOfFile ( ) { }
}
?>[/PHP]
[PHP]<?php
//clssearchindex. php
require_once('c lsrecordset.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;
}
}
}
?>[/PHP]
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?
<?php
//clsrecordset.ph p
class Recordset extends Database{
public function Recordset( ) { }
public function query( ) { }
public function endOfFile ( ) { }
}
?>[/PHP]
[PHP]<?php
//clssearchindex. php
require_once('c lsrecordset.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;
}
}
}
?>[/PHP]
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?
Comment