(was
insert into two table and check
table perl DBI
On Wed, Mar 31, 2004 at 08:23:02PM -0800, Michael Peppler wrote:
On Wed, 2004-03-31 at 17:56, Jonathan Leffler wrote:
Dean Arnold wrote:
A few months ago we had discussed on this list _standardizing_ error
handling for things like trying to insert duplicate records, but I kind
of dropped
insert into two table and check
table perl DBI
hai everyone, i have write scripts perl on the top and if i input data
12345678,Hendra Kusnandar,123456 data will insert
into table user, and if i input wrong format data will insert into log.
this scripts is work but if i insert again 12345678,Hendra Kusnandar,123456
scripts will error and the
I believe that currently the only way to properly handle that is to
capture the error output ( 'perldoc DBI' at a command prompt and search
for Transaction and eval) and parse that output for something common
to all instances where you try to insert a duplicate record. Something
like the string
A few months ago we had discussed on this list _standardizing_ error
handling for things like trying to insert duplicate records, but I kind
of dropped the ball - changing jobs and all didn't leave me enough time
to persue that standardization with members of this list. And since now
I don't
Dean Arnold wrote:
A few months ago we had discussed on this list _standardizing_ error
handling for things like trying to insert duplicate records, but I kind
of dropped the ball - changing jobs and all didn't leave me enough time
to persue that standardization with members of this list. And
Dean Arnold wrote:
A few months ago we had discussed on this list _standardizing_ error
handling for things like trying to insert duplicate records, but I kind
of dropped the ball - changing jobs and all didn't leave me enough time
to persue that standardization with members of this list.
On Wed, 2004-03-31 at 17:56, Jonathan Leffler wrote:
Dean Arnold wrote:
A few months ago we had discussed on this list _standardizing_ error
handling for things like trying to insert duplicate records, but I kind
of dropped the ball - changing jobs and all didn't leave me enough time
to
Dean Arnold wrote:
Jonathan Leffler wrote:
Dean Arnold wrote:
Hardy Merrill wrote:
A few months ago we had discussed on this list _standardizing_ error
handling for things like trying to insert duplicate records [...] Basically all it
involved
was putting together a list of common error
#!/usr/bin/perl
use DBI;
sub insert_user {
my ($nim, $nama, $password) = @_;
my ($insert_sql,$sth);
$database = practice_perl;
$dbuser = hendra;
$dbpasswd = hendra;
$dbhost = localhost;
$dsn = DBI:mysql:database=$database;host=$dbhost;
$dbh = DBI-connect($dsn,$dbuser,$dbpasswd) || die
11 matches
Mail list logo