[GENERAL] first steps in PhP and PostgreSQL

2006-11-06 Thread Desmond Coughlan
X-No-Archive: true   Hi, I'm sure that it's a typo or something, but as I'm getting into PhP and PostgreSQL for the first time, I can't be sure.   I have a db, called 'cdi' ..   A 'SELECT * FROM stock;' gets me this in psql ..   cdi=> SELECT * from stock ;-[ RECORD 1 ]-+-

Re: [GENERAL] first steps in PhP and PostgreSQL

2006-11-06 Thread Bill Moran
In response to Desmond Coughlan <[EMAIL PROTECTED]>: > X-No-Archive: true X-WTF: huh? [snip] > I copy that file to my apache server, in php_experimental/base.php > and access it via a browser. > > I don't get an error message. I instead get a blank page. Check the applicable php.ini fo

Re: [GENERAL] first steps in PhP and PostgreSQL

2006-11-06 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-11-06 15:05:25 +0100: > I'm sure that it's a typo or something, but as I'm getting into PhP > and PostgreSQL for the first time, I can't be sure. > pg_connect ("dbname=cdi user=cdi password=toto") or die > ("Couldn't Connect: ".pg_last_error()); > $query="SELECT

Re: [GENERAL] first steps in PhP and PostgreSQL

2006-11-06 Thread Richard Huxton
Desmond Coughlan wrote: Firstly, rewrite this as $sql = "SELECT * FROM stock"; $res = pg_query($sql); echo "pg_query($sql) = $res"; echo "num rows = ".pg_num_rows($res).""; // start the output while($row=pg_fetch_array($query,NULL,PGSQL_ASSOC)) { echo "Title: ".$row['isbn_no'].

Re: [GENERAL] first steps in PhP and PostgreSQL

2006-11-06 Thread Ben
Have you checked your webserver error logs? On Mon, 6 Nov 2006, Desmond Coughlan wrote: X-No-Archive: true Hi, I'm sure that it's a typo or something, but as I'm getting into PhP and PostgreSQL for the first time, I can't be sure. I have a db, called 'cdi' .. A 'SELECT * FROM stock;' ge

RE : Re: [GENERAL] first steps in PhP and PostgreSQL

2006-11-09 Thread Desmond Coughlan
X-No-Archive: true   Yep...   192.168.0.254 - - [07/Nov/2006:10:12:57 +0100] "GET /php_experimental/base.php HTTP/1.1" 200 - "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)" D.Ben <[EMAIL PROTECTED]> a écrit : Have you checked your webserver error logs?On Mon, 6 Nov 2006, Desmond Cou

Re: RE : Re: [GENERAL] first steps in PhP and PostgreSQL

2006-11-07 Thread Ben
No, that's the access log. Check the error log. On Tue, 7 Nov 2006, Desmond Coughlan wrote: X-No-Archive: true Yep... 192.168.0.254 - - [07/Nov/2006:10:12:57 +0100] "GET /php_experimental/base.php HTTP/1.1" 200 - "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)" D. Ben <[EMAIL PR

RE : Re: RE : Re: [GENERAL] first steps in PhP and PostgreSQL

2006-11-09 Thread Desmond Coughlan
X-No-Archive: true   Ah...   [Wed Nov 08 09:32:56 2006] [error] [client 192.168.0.254] PHP Fatal error:  Call to undefined function:  pg_connect() in /usr/local/www/data/php_experimental/base.php on line 6   Ben <[EMAIL PROTECTED]> a écrit : No, that's the access log. Check the error log.On