Posted by Toby A Inkster on 07/13/07 12:09
MichaelD wrote:
> class testing implements Iterator
> {
> protected static $connection = false;
> ...
>
> public static function setConnection($connection)
> {
> if(!testing::connection)
> $this->connection = $connection;
> }
>
> public function __construct($query)
> {
> if(!testing::connection)
> echo 'Connection not set.';
> }
> ...
> }
class testing implements Iterator
{
protected static $connection = false;
...
public static function setConnection($connection)
{
if(!self::$connection)
self::$connection = $connection;
}
public function __construct($query)
{
if(!self::$connection)
echo 'Connection not set.';
}
...
}
--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 22 days, 15:48.]
demiblog 0.2.0 Released
http://tobyinkster.co.uk/blog/2007/06/28/demiblog-0.2.0/
Navigation:
[Reply to this message]
|