Re: Insert help...
From: Mark Addison (mark.addison_at_itn.co.uk)
Date: 03/17/05
- Next message: Jared Still: "Re: Oracle nested selects"
- Previous message: Joachim Goerner: "AW: WG: what's wrong in Win32-OLE, DBD-ADO ..."
- In reply to: Scott V \ Nipp: "Insert help..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: "NIPP, SCOTT V (SBCSI)" <sn4265@sbc.com> Date: Thu, 17 Mar 2005 15:18:03 +0000
On Tue, 2005-03-15 at 13:24 -0600, NIPP, SCOTT V (SBCSI) wrote:
<snip>
> $dbh->do(qq{
> INSERT INTO AllMid_Hist VALUES (?".(",?" x 22)."))}, #
> This is where I run into issues.
> undef,@old,NOW()); # I am not sure how to
> structure this syntax and not having luck finding the answer.
> }
> }
> }
You can't bind sql functions via placeholders, just inline them in the
query:
$dbh->do("INSERT INTO AllMid_Hist VALUES (?".(",?" x 22).",NOW())",
undef,@old
);
I would also 2nd Ron's suggestion of preparing the statement outside the
loop rather than using do.
mark
-- This email (and any attachments) is intended solely for the individual(s) to whom addressed. It may contain confidential and/or legally privileged information. Any statement or opinions therein are not necessarily those of ITN unless specifically stated. Any unauthorised use, disclosure or copying is prohibited. If you have received this email in error, please notify the sender and delete it from your system. Security and reliability of the e-mail and attachments are not guaranteed. You must take full responsibility for virus checking. Independent Television News Limited, Registered No. 548648 England, VAT Reg. No: GB 756 2995 81, 200 Gray's Inn Road, London WC1X 8XZ, Telephone: 020 7833 3000.
- Next message: Jared Still: "Re: Oracle nested selects"
- Previous message: Joachim Goerner: "AW: WG: what's wrong in Win32-OLE, DBD-ADO ..."
- In reply to: Scott V \ Nipp: "Insert help..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]