[PHP] Re: postgresql database access failure

2011-05-02 Thread Matt Graham
Florin Jurcovici wrote: > My personal recommendation, however, is to drop old-style procedural > drivers and switch to PDO - it's much more convenient to use, IMO. Just be careful. PDO's implementation of MySQL doesn't implement the mysql_set_charset() function, or at least it didn't a while back

Re: [PHP] Re: postgresql database access failure

2011-05-02 Thread Tim Streater
On 02 May 2011 at 11:05, e-letter wrote: >> >> Here's the URL of the relevant manual page: >> http://www.php.net/manual/en/function.pg-fetch-result.php >> > > The manual page did not explain the purpose of the text 'die', so was > ignored (;)). What, you mean this? $db = pg_connect("dbnam

[PHP] Re: postgresql database access failure

2011-05-02 Thread e-letter
> >Here's the URL of the relevant manual page: >http://www.php.net/manual/en/function.pg-fetch-result.php > The manual page did not explain the purpose of the text 'die', so was ignored (;)). Anyway, the php code was amended as follows: The result is a web page which shows: list of fil

[PHP] Re: postgresql database access failure

2011-05-02 Thread Florin Jurcovici
Hi.                $db = pg_connect('dbname=webcuttings user=httpd'); >                $query = 'SELECT * FROM articles'; >                $value=pg_fetch_result($query); >                echo 'all files' $value; >        ?> Maybe a password is set on your database for the user httpd? You have