Posted by Erwin Moller on 08/10/06 08:30
rich wrote:
> I am running this SQL statement in php 4.39 to Postgresql 7.3.4 and I
> keep getting this error
>
> Warning: pg_query(): Query failed: ERROR: syntax error at or near
> "WITHOUT" at character 29 in /var/www/html/liberty/includes/test2.php
> on line 12
>
> I can't figure out why this is failing.
>
> $buildtableQ = "CREATE TABLE $tempname WITHOUT OIDS AS
> SELECT rt.resid, max(rt.transdate)
> FROM li_roomtransfer as rt
> JOIN li_resident AS r ON rt.resid = r.resid
> WHERE r.nursehomeid = '1'AND r.distribid = '1'
> GROUP BY rt.resid";
> $buildtableR = pg_query($buildtableQ); This is Line 12. any
> suggestions?
Hi,
You misplaced the WITHOUT OIDS.
Read more here:
http://www.postgresql.org/docs/7.3/interactive/sql-createtable.html
Regards,
Erwin Moller
PS: What do you have against OIDs? :P
Navigation:
[Reply to this message]
|