X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.192]) by svr1.postgresql.org (Postfix) with ESMTP id 2D8EECB961 for ; Sun, 13 Jul 2003 13:59:23 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr4.postgresql.org [64.117.224.192]) (amavisd-new, port 10024) with ESMTP id 63613-08 for ; Sun, 13 Jul 2003 13:59:40 +0000 (GMT) Received: from lighthouse.MplusB.de (lighthouse.MplusB.de [193.102.49.10]) by svr1.postgresql.org (Postfix) with ESMTP id 0402FCB97A for ; Sun, 13 Jul 2003 10:59:20 -0300 (ADT) Received: from [193.102.49.130] (helo=compass.MplusB.de) by lighthouse.MplusB.de with esmtp (Exim 3.35 #1 (Debian)) id 19bhO5-00075M-00; Sun, 13 Jul 2003 15:59:37 +0200 Received: from MplusB.de (gerd@sloop.MplusB.de [193.102.49.177]) by compass.MplusB.de (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id PAA08384; Sun, 13 Jul 2003 15:59:37 +0200 X-Authentication-Warning: compass.MplusB.de: Host gerd@sloop.MplusB.de [193.102.49.177] claimed to be MplusB.de Message-ID: <3F1165C8.8080702@MplusB.de> Date: Sun, 13 Jul 2003 15:59:36 +0200 From: Gerd Terlutter User-Agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.0.2) Gecko/20030401 Debian/1.0.2-2 X-Accept-Language: de-de MIME-Version: 1.0 To: pgsql-php@postgresql.org Cc: rhunter@venticon.com Subject: Re: pg_query undefined? References: <1058076012.5117.4.camel@localhost.localdomain> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/22 X-Sequence-Number: 2134 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 # --------------------------------------------------------