PREPARE -> EXEC Problem

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)?






--
Sent via pgsql-php mailing list (pgsql-php [at] postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-php
devel [ Mi, 14 Januar 2009 19:39 ] [ ID #1984940 ]

Re: PREPARE -> EXEC Problem

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
(http://au2.php.net/manual/en/pdo.constants.php) 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
http://www.designmagick.com/


--
Sent via pgsql-php mailing list (pgsql-php [at] postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-php
dmagick [ Do, 15 Januar 2009 05:40 ] [ ID #1984941 ]
Datenbanken » gmane.comp.db.postgresql.php » PREPARE -> EXEC Problem

Vorheriges Thema: Re: PREPARE -> EXECUTE Problem
Nächstes Thema: Question on libpq.so