Re: DBI execute problem

2003-07-17 Thread Jenda Krynicky
From: Ramprasad <[EMAIL PROTECTED]> > You are right it is weird. But just a test script to learn DBI. What I > really want is how Can I use prepare and execute which I think is > better than doing a do every time If my table name keeps changing > > Is a prepare statement always specific to a table

RE: DBI execute problem

2003-07-17 Thread Balint, Jess
ge- > From: Ramprasad [mailto:[EMAIL PROTECTED] > Sent: Thursday, July 17, 2003 10:22 AM > To: [EMAIL PROTECTED]; Rob Dixon > Cc: [EMAIL PROTECTED] > Subject: Re: DBI execute problem > > > > Hi Ram. > > > > If all you're doing is to create a number

Re: DBI execute problem

2003-07-17 Thread Ramprasad
Hi Ram. If all you're doing is to create a number of tables then I'd get Perl to write the whole SQL statement for you and just $dbh-do($sql) Even so, what you've written is weird. You're creating a set of thirty tables, each with two character columns with a maximum length equal to the table n

Re: DBI execute problem

2003-07-17 Thread Rob Dixon
Ramprasad wrote: > Hello all, > > I have a mysql database and I want to create tables > w1 w2 w3 w4 ... w30 > > Can I use the prepare and execute methods of DBI > I am getting an error because DBI is quoting the table name and > Mysql is not accepting it > > This is my code > > #!/usr/bin/perl > us

DBI execute problem

2003-07-17 Thread Ramprasad
Hello all, I have a mysql database and I want to create tables w1 w2 w3 w4 ... w30 Can I use the prepare and execute methods of DBI I am getting an error because DBI is quoting the table name and Mysql is not accepting it This is my code #!/usr/bin/perl use DBI; use strict; my $dbh = DBI->conne