List:General Discussion« Previous MessageNext Message »
From:Justin Plock Date:March 19 1999 4:43am
Subject:Creation of Databases in perl?
View as plain text  
I was wondering if anybody knew any way to create databases and tables from
within a web-based perl script.  Someone gave me some sample code that
basically is just piping the SQL commands to mysql:

open (MYH, "|mysql --user=username --password=password") || die "Cannot open
pipe to mysql\n";
print MYH <<"EOF";
drop table domains;
drop table hosts;
create table domains (ip char(15) not null primary key);
create table hosts (ip char(15) not null primary key);
EOF

But this code don't seem to work.  Any suggestions would be appreciated.
Thanks.

                            -Justin Plock

Thread
Creation of Databases in perl?Justin Plock19 Mar
  • Re: Creation of Databases in perl?Mike Machado19 Mar
    • RE: Creation of Databases in perl?(Brandon Shuey)19 Mar
    • Re: Creation of Databases in perl?Christopher R. Jones19 Mar
  • Re: Microsoft Access <-> MySQL Data ConversionsJacob Martin30 May
  • Re: Microsoft Access <-> MySQL Data ConversionsJesús Gómez30 May