[Chicago-talk] perl DBI ?
Richard Reina
richard at rushlogistics.com
Wed Mar 16 09:15:58 PST 2005
Pete,
Thanks you very much for your response. I am not
refuting waht you say, as you clearly know more than
I. However, do you happen to know why is it that it
works when it's a stand alone program? Would you
happen to know of a work around for creating a table
with a unique name from w/in another program.
Thanks again,
Richard
--- Pete Krawczyk <mongers at bsod.net> wrote:
> Subject: [Chicago-talk] perl DBI ?
> From: Richard Reina <richard at rushlogistics.com>
> Date: Wed, 16 Mar 2005 09:01:17 -0800 (PST)
>
> }my $q = "CREATE TABLE IF NOT EXISTS CS_? (
>
> You can't bind like that. Binds can only be used in
> certain instances:
> SELECT item FROM table WHERE column = ?
> INSERT INTO table (item) VALUES (?)
> UPDATE table SET item = ? WHERE column = ?
> ...and in a few other cases, but never as keywords,
> and never as in:
> SELECT item FROM table WHERE column IN ?
> SELECT ? FROM table WHERE column = ?
> SELECT item FROM ? WHERE column = ?
> SELECT item FROM table WHERE ? = ?
>
> Although, you could do:
> SELECT item FROM table WHERE column IN (?,?)
> ...and supply multiple bind variables.
>
> But you can't keyword binds, and binds can't be
> generally be used to
> express nulls (i.e 'column = ?',undef is not the
> same as 'column IS NULL')
>
> See "Placeholders and Bind Values" in "perldoc DBI".
>
> -Pete K
> --
> Pete Krawczyk
> perl at bsod dot net
>
> _______________________________________________
> Chicago-talk mailing list
> Chicago-talk at pm.org
> http://mail.pm.org/mailman/listinfo/chicago-talk
>
More information about the Chicago-talk
mailing list