This shows my inexperience with PHP.  I changed the case of the $db to $DB and 
it worked.  Thanks for the simple solution!

Paul

-----Original Message-----
From: glpi-dev-boun...@gna.org [mailto:glpi-dev-boun...@gna.org] On Behalf Of 
MoYo
Sent: Friday, March 06, 2009 2:48 AM
To: Liste de diffusion des developpeurs GLPI
Subject: Re: [Glpi-dev] database connection

CTS-Programmer 3 (Paul Dokken) a écrit :
>
> I am upgrading an instance of glpi from 0.68.3 to .071.5 and am 
> getting an error message on a page that we wrote. I get this error 
> message "*Fatal error*: Call to a member function query() on a non-object"
>
> Here is what the code looks like:
>
> .
>
> define('GLPI_ROOT', '..');
>
> include (GLPI_ROOT . "/inc/includes.php");
>
> .
>
> $query = "SELECT * from glpi_tracking where id=$_GET[ID]";
>
> echo($query);
>
> $result = $db->query($query);
>
> $ticket = $db->fetch_array($result);
>
Hi,

$DB instead of $db ?
But I think you change something on your server when you upgrade GLPI 
(Windows -> linux for example).

Regards

Julien


_______________________________________________
Glpi-dev mailing list
Glpi-dev@gna.org
https://mail.gna.org/listinfo/glpi-dev

_______________________________________________
Glpi-dev mailing list
Glpi-dev@gna.org
https://mail.gna.org/listinfo/glpi-dev

Reply via email to