[Chicago-talk] perl DBI ?

Richard Reina richard at rushlogistics.com
Wed Mar 16 09:23:30 PST 2005


I am actually trying to create a unique table, hense
that's why I would like the script to pick the table's
name based on the transaction number.

--- Andy Lester <andy at petdance.com> wrote:

> On Wed, Mar 16, 2005 at 09:01:17AM -0800, Richard
> Reina (richard at rushlogistics.com) wrote:
> > when I run these lines of code :
> > 
> > my $T_NO = 12569;
> > use DBI;
> > my $dbh =
> >
>
DBI->connect("DBI:mysql:database=carr_search;192.168.0.1",user,password);
> > 
> > my $q = "CREATE TABLE IF NOT EXISTS CS_? (
> 
> You're trying to bind a variable to a table name
> somehow?  So it's 
> 
> CREATE TABLE IF NOT EXISTS CS_12569 
> 
> I don't think that's legal.  Bind variables are only
> valid for fields.
> Instead, embed the $T_NO directly into the SQL.
> 
> I'm concerned that you're making a bunch of
> identical tables, though.
> Why is that?
> 
> xoa
> 
> -- 
> Andy Lester => andy at petdance.com => www.petdance.com
> => AIM:petdance
> _______________________________________________
> 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