Will this error?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
swraman
Forum Commoner
Posts: 58
Joined: Thu Nov 06, 2008 12:33 am

Will this error?

Post by swraman »

Is this query suposed to error?

pg_query("INSERT INTO tr_projects() VALUES()");

Or under what circumstances will it error?

Thanks
Mark Baker
Forum Regular
Posts: 710
Joined: Thu Oct 30, 2008 6:24 pm

Re: Will this error?

Post by Mark Baker »

I'd expect it to error under every circumstance, with the sole possible exception of every column in the tr_projects table having a default or an autoincremented field, or being populated by a triggered function.
swraman
Forum Commoner
Posts: 58
Joined: Thu Nov 06, 2008 12:33 am

Re: Will this error?

Post by swraman »

is there any way to check if the db is set to make default values?

I didnt write this code, and its my first time working with pgsql, so im a but clueless.

Thanks
Post Reply