Re: small question php/postgreSQL
| From: | Chris | Date: | Tue, 07 Nov 2006 22:43:05 +0000 |
| Subject: | Re: small question php/postgreSQL | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-42653@lists.php.net to get a copy of this message | ||
Desmond Coughlan wrote:
X-No-Archve: true Hi, I've been trying to get a small DB up and working with PhP. It's a library, and so far, I can't get past the stage of displaying a page. I try the 'hello world' example, and it displays. I then populate a DB and can access it via psql .. cdi=> SELECT * FROM stock ; -[ RECORD 1 ]-+-------------------------------If that doesn't work - then you don't have the php-postgres library installed. Check your phpinfo page for "postgresql" - if it's not there, then that's your problem. -- Postgresql & php tutorials http://www.designmagick.com/stock_ids | 1 isbn_no | 10101010 code_livre | 23455 titre | toto goes to Hollywood editeur | editions toto collection | collection toto auteur_nom | smithauteur_prenom | johnmatiere | ang media_type | li-[ RECORD 2 ]-+-------------------------------stock_ids | 2 isbn_no | 10536278 code_livre | 24874 titre | toto comes back from Hollywood editeur | editions baba collection | collection toto auteur_nom | martinauteur_prenom | petermatiere | fre media_type | dvdOK, I then write the following script .... <?php pg_connect ("dbname=cdi user=cdi password=toto") or die ("Couldn't Connect: ".pg _last_error());