Received: from inf1.infoserv.net (inf1.infoserv.net [200.34.71.213]) by hub.org (8.9.1/8.9.1) with ESMTP id MAA20810 for ; Wed, 27 Jan 1999 12:22:45 -0500 (EST) (envelope-from jpmarichal@infoacces.com) Received: from html ([207.249.66.254]) by inf1.infoserv.net (Post.Office MTA v3.1.2 release (PO203-101c) ID# 0-52532U15000L15000S0V35) with SMTP id AAA18463 for ; Wed, 27 Jan 1999 11:25:05 -0600 Message-ID: <199901271127170010.006DB5FC@infoacces.com> X-Mailer: Calypso Version 2.40.41.08 Date: Wed, 27 Jan 1999 11:27:17 -0600 Reply-To: jpmarichal@infoacces.com From: jpmarichal@infoacces.com (Juan Pablo Marichal Catalan) To: pgsql-sql@postgresql.org Subject: PLEASE, HELP! Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by hub.org id MAA20814 I cant' find the way! I'm building a system to a contest. I have three tables: participantes (partakers), ordenes (orders) and productos (products). Partakers on the contest introduce their id in an HTML form, then this calls a PHP to query the database and return data taken from the three tables. Using Microsoft Access, I get the SQL code for the query, then I copy it and paste it in my PHP code: $result=pg_Exec($conn,"SELECT participantes.idven, participantes.nombreven, participantes.iding, participantes.nombreing, participantes.empresa, ordenes.num_ordenuf, ordenes.factura_spasp, ordenes.factura_vad, ordenes.fecha, ordenes.num_producto, productos.descripcion, ordenes.mayorista, productos.puntos, ordenes.cantidad, [puntos]*[cantidad] AS Total FROM productos INNER JOIN (participantes INNER JOIN ordenes ON idven = participante) ON idproducto = num_producto WHERE (((idven)="VHA1901081"))"); But Postgress don't accept the . operator, so it drops to me those nasty 'parse' error messages. I don't know if it's only due to the . operator, or the use of upper case or what. How must I build the SQL query to be accepted by Postgress and PHP? I'm drowning on it! ______________________ Brotherly, JPMarichal jpmarichal@infoacces.com ICQ# 17246887