Skip site navigation (1) Skip section navigation (2)

Re: PREPARE -> EXEC Problem

From: Chris <dmagick(at)gmail(dot)com>
To: "F(dot)" <dev001(at)pas-world(dot)com>
Cc: pgsql-php(at)postgresql(dot)org
Subject: Re: PREPARE -> EXEC Problem
Date: 2009-01-15 04:40:48
Message-ID: (view raw or whole thread)
Lists: pgsql-php
F. wrote:
> Hello,
> I'm trying to execute a query with a DEFAULT value for primary key value
> but do not work.
> 	pdo->prepare("INSERT INTO "Table" ("id","colum") VALUES(?,?)");
> 	$arr=('DEFAULT','helloworld');
> Result of PDO is "not valid value for integer".
> Anyone know, How assign DEFAULT value in pdo->exec($arr)? 

I would have guessed there'd be a constant defined for it 
( but can't see anything.

Can you not include the column in the query? then the db will 
automatically use the default value.

Postgresql & php tutorials

In response to

pgsql-php by date

Next:From: F.Date: 2009-01-15 11:43:30
Subject: Re: PREPARE -> EXECUTE Problem
Previous:From: F.Date: 2009-01-14 18:39:45
Subject: PREPARE -> EXEC Problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group