Re: Classes Question

From: Date: Mon, 12 Nov 2001 10:25:50 +0000
Subject: Re: Classes Question
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-74251@lists.php.net to get a copy of this message
Thanks Andrew... I basically tried that, but without the ampersand symbols. I'll give that a try Many thanks, Paul "Andrew Kirilenko" <icedank@gmx.net> wrote in message news:OJEKLPGKHAMOHLFGNLNOCELDCCAA.icedank@gmx.net... > Hello! > > Try to declare CheckBannedUser as "function CheckBannedUser ($foo, &$db)" > and call it "$users->CheckBannedUsers("foo", &$db)" > > Note ampersand symbols! > > Best regards, > Andrew Kirilenko. > > > -----Original Message----- > > From: PaulC [mailto:couton@bigfoot.com] > > Sent: Sunday, November 11, 2001 8:10 PM > > To: php-general@lists.php.net > > Subject: [PHP] Classes Question > > > > > > I'm hoping somebody has the answer to this! > > > > I have 3 pages, one a normal PHP page, and 2 which are classes. > > > > One class, is a MySQL class I have written to connect/update users, etc > > And the other is the manage users on the system. > > > > Is there a way I can get the "users" class to talk to the "mysql" > > class? > > > > I have this code to make a new instance of the MySQL class (the True means > > use persistent connections) and a new instance of the users class > > > > $db = new MySQL(True); > > $users = new Users(); > > > > I am then using this code to check the list of banned users > > > > $users->CheckBannedUser("spacetowns",$db); > > > > In the CheckBannedUser function, I have this > > > > $db->sql_query("SELECT user FROM banned_users"); > > > > But that does not work, (it works fine when used from the > > standard PHP page) > > > > Is it not possible to do what I am trying to do? > > Or am I doing it all wrong? > > > > Many thanks, > > Paul > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > >

« previous php.general (#74251) next »