pg.ddx.io pgsql-php@postgresql.org mailing list archive
help / color / mirror / Atom feedPREPARE -> EXEC Problem
2+ messages / 2 participants
[nested] [flat]
* PREPARE -> EXEC Problem
@ 2009-01-14 18:39 F. <dev001@pas-world.com>
2009-01-15 04:40 ` Re: PREPARE -> EXEC Problem Chris <dmagick@gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: F. @ 2009-01-14 18:39 UTC (permalink / raw)
To: pgsql-php
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)?
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: PREPARE -> EXEC Problem
2009-01-14 18:39 PREPARE -> EXEC Problem F. <dev001@pas-world.com>
@ 2009-01-15 04:40 ` Chris <dmagick@gmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: Chris @ 2009-01-15 04:40 UTC (permalink / raw)
To: F. <dev001@pas-world.com>; +Cc: 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
(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/
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2009-01-15 04:40 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2009-01-14 18:39 PREPARE -> EXEC Problem F. <dev001@pas-world.com>
2009-01-15 04:40 ` Chris <dmagick@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox