Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id E264C6322FA for ; Thu, 15 Jan 2009 00:40:58 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 79047-08 for ; Thu, 15 Jan 2009 00:40:55 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.233]) by mail.postgresql.org (Postfix) with ESMTP id 6D6E96322F4 for ; Thu, 15 Jan 2009 00:40:55 -0400 (AST) Received: by rv-out-0506.google.com with SMTP id b25so921508rvf.43 for ; Wed, 14 Jan 2009 20:40:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=NBdmd3JdRHgnsV9r4CRM5urQ/lw4aIFKXY0NCtJp2+w=; b=qSgHRDxHLDclQrl0fsraAzEXQgF8Q9qxL99TCxkQ7a+ecu7iDPf9xKRL+mssvV8J8S /AmHuK5L7W27ur/H2PgSlTfTlt1bixl0ZX65zGIGXTCmNjwkvNjRzp+ahFXyWP5KHHKJ +MRyYmlVbYAsfnmIG3W2zUFKKuVkfvf8LoSJ8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=hXD1RSXL21UteNSsW98F7GAg/Rp/QOZB5jr6GkFtrxhYLTtdM7ChYsZJdiwJANkYVa riBRuMacKaHIheEsSzpJqMOTSHoFytPLePC2F4mlrQ6mVAPwEAsArXD2JsGNdK1XkavP qs69K4RUpv+FOHdsf5AJMVI7vaMZ61PEJDHuU= Received: by 10.141.68.12 with SMTP id v12mr389752rvk.153.1231994454048; Wed, 14 Jan 2009 20:40:54 -0800 (PST) Received: from ?192.168.0.220? (office.squiz.net [203.206.128.174]) by mx.google.com with ESMTPS id g14sm462955rvb.0.2009.01.14.20.40.50 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 14 Jan 2009 20:40:52 -0800 (PST) Message-ID: <496EBE50.5010109@gmail.com> Date: Thu, 15 Jan 2009 15:40:48 +1100 From: Chris User-Agent: Thunderbird 2.0.0.19 (X11/20090105) MIME-Version: 1.0 To: "F." CC: pgsql-php@postgresql.org Subject: Re: PREPARE -> EXEC Problem References: <1231958385.11956.6.camel@localhost.localdomain> In-Reply-To: <1231958385.11956.6.camel@localhost.localdomain> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200901/12 X-Sequence-Number: 3967 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/