Why dont this work??

Why dont this work??

Friday 12 December 2003 7:00:55 am - 3 replies

Author Message

Eirik Alfstad Johansen

Sunday 14 December 2003 10:45:19 am

Hi Claus,

I might be way off here, but shouldn't the ampersand be before the equal sign when you create an instance of the eZDB class?

Like this:

$db &= eZDB::instance();

Sincerely,

Eirik Johansen
Netmaking AS

http://www.netmaking.no/

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Claus Jensen

Sunday 14 December 2003 11:51:15 pm

Morning,
Its working in ezpublish so I guess maybe you can do both with the same result. I cant get why this is not working.

Anybody else? Here it is again:
//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.

If somebody has a clue, please let me know.
claÜs

Eirik Alfstad Johansen

Monday 15 December 2003 3:24:07 am

Hi again Claus,

Shouldn't you also include the /lib/ezdb/classes/ezdb.php which includes the class definition for eZDB class? Also, you might want to print out the $db var to see what it actually contains.

Sincerely,

Eirik Johansen
Netmaking AS

http://www.netmaking.no/

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

You must be logged in to post messages in this topic!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.