You are here: Re: Why won't this code work in Postgresql and php? « PHP Programming Language « IT news, forums, messages
Re: Why won't this code work in Postgresql and php?

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация