____________________________________________________________________
Get free e-mail and a permanent address at http://www.netaddress.com/?N=1
--- Begin Message ---
I have been trying to get PHP to work with Postgres for a little
while now.  I am able to access the database using psql (not
pgaccess, which is another problem, I don't have any authentication too).

My php3 script is:
           
<? print("this is a test of the postgres stuff");?>                           
 
<? $d=pg_connect("dbname=foo user=postgres"); ?>                              
 
<? echo $d; ?>                                                                
 
<? $e=pg_exec($d,"select * from bar"); ?>                                     
 
<? echo $e; ?>                                                                
 
<? $f=pg_fetch_row($e,0); ?>  

I get past the pg_connect and the pg_exec, but the following is the
error:
        Fatal error: Call to unsupported or undefined function pg_fetch_row() in
/var/www/php/mytest.php3 on line 22

I have tried pg_fetch_object, and pg_fetch_array.  All of which
give the same error, with exception of the function name.

So, why would it work for some commands and not for others.

Thanks,

J

                                                  

Here is my setup:
        
        debian linux 2.0
        kernel 2.0.34
        
        debian packages (related)
        php3 3.0-2
        php3-dev 3.0-2
        php3-doc 3.0-2
        php3-gd 3.0-1
        php3-mysql 3.0-1
        php3-pgsql 3.0-1

        apache 1.3.0-2
        apache-dev 1.3.0-2

____________________________________________________________________
Get free e-mail and a permanent address at http://www.netaddress.com/?N=1

--- End Message ---

Reply via email to