Friday 12 December 2003 7:00:55 am
Hello there, Im trying to do a query to the ezdb inside a php-script im making, to import some objects from a text file. Here is the code:
include_once( "lib/ezutils/classes/ezdebug.php" );
//eZDebug::setHandleType( EZ_HANDLE_FROM_PHP );
include_once( "lib/ezutils/classes/ezmodule.php" );
eZModule::setGlobalPathList( array( "kernel" ) );
include_once( 'lib/ezutils/classes/ezexecution.php' );
include_once( 'kernel/classes/ezcontentobjecttreenode.php' );
eZDebug::setHandleType( EZ_HANDLE_TO_PHP );
eZDebug::setLogFileEnabled( false );
eZINI::setIsCacheEnabled( false );
eZExecution::addCleanupHandler( 'eZDBCleanup' ); eZExecution::addFatalErrorHandler( 'eZFatalError' );
//get db-connection
$db =& eZDB::instance();
...
//this is the line its refering to, line 84
$rows = $db->arrayQuery( "SELECT * FROM ezcontentobject_tree WHERE parentnode_id = $parentnodeid" ); ...etc
and the output when I run it is:
<b>Fatal error</b>: Call to a member function on a non-object in <b>/data/ezpublish/3.2-1/met_imp_final.php</b> on line <b>84</b><br />
Fatal error: eZ publish did not finish it's request The execution of eZ publish was abruptly ended. Its like $db is not an object?!?!? I dont get it. Does anybody know why this is happening?
Thanks for replys, claÜs
|