From: | jpmarichal(at)infoacces(dot)com (Juan Pablo Marichal Catalan) |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Equivalent for an Access query |
Date: | 1999-01-27 16:58:39 |
Message-ID: | 199901271058390710.005380C0@infoacces.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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(at)infoacces(dot)com
ICQ# 17246887
From | Date | Subject | |
---|---|---|---|
Next Message | Juan Pablo Marichal Catalan | 1999-01-27 17:22:41 | Is any quick help to SQL functions? |
Previous Message | Juan Pablo Marichal Catalan | 1999-01-27 16:49:37 | Please suscribe me. |