From: "Andrew Halliday" <[EMAIL PROTECTED]>

> Okay - Im writing an object to wrap a database.
> The key problem is this:
>     - it declares a connection var as an object property
>     - the open() function opens the connection to the database and stores
> the handle in $this->connection
>     - the executeQuery() method complains about not having a valid handle,
> because by then, somehow, $this->connection==null!!!
>
> Any ideas?-i swear its just something stupid ive missed ...
>
> HELP!
>
> Thanx in advance,
> AndrewH
>
> -------------------------------------------------------------
> The code following this returns the following to the browser:
> -------------------------------------------------------------
> The connection in open() is :Resource id #1
> The connection in executeQuery() is :''
>
> Warning: Supplied argument is not a valid PostgreSQL link resource in
> /var/wwwroot/php/PostgreSQLDataSource.php on line 67
>
>
> -------------------------------------------------------------
>


What happens if you do:

<?php
    $db = new PostgreSQLDataSource("host", "port", "user", "pass", "db");
    $db->open();

    echo $db->connection;
?>


Cheers

Simon Garner


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to