Re: Classes and Functions and If's (Problems Again)

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

 



On 11/4/05, Unknown Unknown <phpinfolist@xxxxxxxxx> wrote:
> Hi everyone, i have some code that proccesses a login form. i have an object
> $DB which works only in SOME areas, this is the code:
>
[...]
> $DB="membersp";
> $SQL="SELECT ID FROM membersonline WHERE ID='$ID' ";
> $DB->Query($SQL);
[...]
> i get an error saying:
>
> *Fatal error*: Call to a member function Query() on a non-object in *
> D:\Apache\Apache(re)\Apache2\htdocs\LoginP.php* on line *21*
> but before line 21 i use $DB and it works fine, but line 21 is a problem,
> any help appreciated

You've not indicated which is line 21, but I presume it's the bit
shortly after you assigned a string to $DB. A string is not an object,
hence the error message.

   -robin

-- 
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