Strange behaviour with self written class

From: Markus Fischer <mfischer(at)josefine(dot)ben(dot)tuwien(dot)ac(dot)at>
To: pgsql-php(at)postgresql(dot)org
Subject: Strange behaviour with self written class
Date: 2001-03-05 09:54:20
Message-ID: 20010305105420.A27544@josefine.ben.tuwien.ac.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

Hello,

I've written a class for the pgsql_* function ( just a
wrapper to speed up things and have a cleaner interface, I've
attached it). While working with it, I've made some interesting
observation :

When create my first instance of the class all works ok; then,
later in a function in my new php file I create another instance
of the same class; this time the connection can be established,
but its somehow corrupted and subsequent queries fail because of
this:

called dbpg->connect()
connectstring -> host=XXXXXXXXXXXXXX user=XXXXXX password=XXXXXXX dbname=XXXXXX
connect() succeeded
connectLink = resource
resource(1) of type (pgsql link)

called <- function called
called dbpg->connect()
connectstring -> host=XXXXXXXXXXXXXX user=XXXXXX password=XXXXXXX dbname=XXXXXX
connect() succeeded
connectLink = resource
resource(1) of type (Unknown)

its still of type resource, but its resource type is NOT pgsql
link like above but 'Unknown'.

Anyone know whats wrong or why this happening ?

thanks
Markus

--
Markus Fischer, http://josefine.ben.tuwien.ac.at/~mfischer/
EMail: mfischer(at)josefine(dot)ben(dot)tuwien(dot)ac(dot)at
PGP Public Key: http://josefine.ben.tuwien.ac.at/~mfischer/C2272BD0.asc
PGP Fingerprint: D3B0 DD4F E12B F911 3CE1 C2B5 D674 B445 C227 2BD0

Attachment Content-Type Size
dbpg.php application/x-httpd-php 3.4 KB

Responses

Browse pgsql-php by date

  From Date Subject
Next Message Michael Fork 2001-03-05 13:53:38 Re: Strange behaviour with self written class
Previous Message Josh Berkus 2001-03-01 05:22:18 Re: [PHP] novice question