in reply to Re: DBI, add fields to existing table?
in thread DBI, add fields to existing table?
prepare() and execute() is preferred over do()my $cmd = "ALTER TABLE $dbTable ADD (NAME text, ADDRESS text)"; my $cmd_prep = $db->prepare($cmd); unless($cmd_prep->execute()) { push(@error, "Database insertion error: ".DBI::errstr); } $cmd_prep->finish();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: DBI, add fields to existing table?
by jZed (Prior) on Aug 21, 2005 at 19:11 UTC |