RE: Fatal error: Call to a member function query() on a non-object in C:\Xampp\xa...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: j.kuehne@xxxxxxxxxxxxxx [mailto:j.kuehne@xxxxxxxxxxxxxx] 
> Sent: 28 June 2006 10:10

 
> Fatal error: Call to a member function query() on a 
> non-object in 
> C:\Xampp\xampp\htdocs\www2\knowledge_db\searchnew.php on line 81
> 
> Even though the $connection has already been established in a 
> other .php file.

You can't do that -- there's simply no way to pass a database connection
from one script to the next.

>  However, it should work since there is a 
> global declaration.

That's not what a global declaration is about.  Please go read the fine
manual again:
http://ch.php.net/manual/de/language.variables.scope.php#language.variab
les.scope.global

Cheers!

Mike
 
------------------------------------------------------------------------
----------------
Mike Ford, Electronic Information Services Adviser, Learning Support
Services,
JG125, The Library, James Graham Building, Headingley Campus, Beckett
Park,
LEEDS, LS6 3QS,     United Kingdom
Tel: +44 113 283 2600 extn 4730    Fax: +44 113 283 3211


To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux