pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gerd Terlutter <gerd@MplusB.de>
To: pgsql-php@postgresql.org
Cc: rhunter@venticon.com
Subject: Re: pg_query undefined?
Date: Sun, 13 Jul 2003 15:59:36 +0200
Message-ID: <3F1165C8.8080702@MplusB.de> (raw)
References: <BB3609D4.544%lynna@gallery44.org>
	<1058076012.5117.4.camel@localhost.localdomain>

Hi all,
best to use for simple statements is PEAR::DB. you can write code 
abstract. i found this out while convert a DB from mysql to pgsql, now 
we'll wrap table and field names. then we are always sureto write 
universal code. the problem was the following:
mysql table and field names are sometimes uppercase
while converting with my2pg.pl all names changed to lowercase
alterante: quote tables and fields, but then quote it in your code to. 
if you try to run this quoted code on mysql you'll get errors.
when we have all wrapped, i hope it will run under several RDBMS.
excuse my bad english, it's to long ago i learned it and not often spoken.
have fun, Gerd

Ray Hunter wrote:
> Also make sure that pgsql is installed in php. By checking the phpinfo()
> function u can verify your php version (4.2+) and if pgsql has been
> compiled into php. 
> 
> If you have 4.2 or higher than u might need to compile pgsql into php.
> 
> --
> Ray
> 
> On Sat, 2003-07-12 at 16:54, Lynna Landstreet wrote:
> 
>>Does anyone know why trying to run a simple demo script (the one that came
>>with EZ_SQL from php.justinvincent.com) would be giving me an error saying
>>that pg_query() is an undefined function? It's a standard function built
>>into PHP, isn't it? It's listed in the manual...
>>
>>I know the installation of PHP at our web host does have PostgreSQL support,
>>because when I ran phpinfo() it seemed to say all the right things about it,
>>so this is really confusing me.
>>
>>
>>Lynna
-- 
--------------------------------------------------------
# Gerd Terlutter        | Mueller+Blanck Software GmbH #
# gerd@MplusB.de        | Gutenbergring 38             #
# gerd.terlutter@web.de | D-22848 Noderstedt           #
# tel:0171/6992579      | tel:+49 40 500 171-1         #
# Buero:040/500171-17   | fax:+49 40 500 171-71        #
--------------------------------------------------------





view thread (6+ messages)  latest in thread

Message-ID: <3F1165C8.8080702@MplusB.de>
Permalink:  ../3F1165C8.8080702@MplusB.de/
Also on:    postgresql.org/message-id/3F1165C8.8080702@MplusB.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: gerd@MplusB.de, rhunter@venticon.com
  Subject: Re: pg_query undefined?
  In-Reply-To: <3F1165C8.8080702@MplusB.de>
  References: <BB3609D4.544%lynna@gallery44.org> <1058076012.5117.4.camel@localhost.localdomain> <3F1165C8.8080702@MplusB.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox