Re: perl DBI and mysql

2003-03-28 Thread jaws
Thanks Ill try that. At 09:26 AM 3/28/2003 +, Rob Anderson wrote: Jaws, This looks like your script is working fine, but the insert your trying to do is in error. I'd guess that your just trying to add a row with a duplicate key, and that's what DBI is complaining about, because of a contrain

Re: perl DBI and mysql

2003-03-28 Thread Rob Anderson
Jaws, This looks like your script is working fine, but the insert your trying to do is in error. I'd guess that your just trying to add a row with a duplicate key, and that's what DBI is complaining about, because of a contraint on the database. You could try different keys, or the INSERT statemen

Re: perl DBI and mysql

2003-03-28 Thread jaws
What will I do to get my script working properly? Thanks for your help. At 04:17 AM 3/28/2003 -0500, Dave K wrote: Jaws, > DBD::mysql::st execute failed: Duplicate entry 'sample' for key 1 at > ./addvpdnuser.pl line 17, <> line 1. > DBD::mysql::st execute failed: Duplicate entry 'sample' for key

Re: perl DBI and mysql

2003-03-28 Thread Dave K
Jaws, > DBD::mysql::st execute failed: Duplicate entry 'sample' for key 1 at > ./addvpdnuser.pl line 17, <> line 1. > DBD::mysql::st execute failed: Duplicate entry 'sample' for key 1 at > ./addvpdnuser.pl line 17, <> line 1. > [EMAIL PROTECTED] util]# This is probably happening because the table

Re: perl DBI and mysql

2003-03-28 Thread jaws
when i run the program like this: [EMAIL PROTECTED] util]# ./addvpdnuser.pl sampleusername, samplepassword,sampledescription,sampleattr DBD::mysql::st execute failed: Duplicate entry 'sample' for key 1 at ./addvpdnuser.pl line 17, <> line 1. DBD::mysql::st execute failed: Duplicate entry 'sample'

Re: perl DBI and mysql

2003-03-28 Thread Rob Anderson
Hi Jaws (!?), You don't say where your script is failing, or what errors it's reporting, which is going to make it hard for anyone to help. You could add some better error checking. Here's a couple of lines lifted from one of my CGI's. my $dbh; eval { $dbh = DBI->connect( $DATA_SOURCE, $DB_USER,

perl DBI and mysql

2003-03-27 Thread jaws
Hi all, i am new to perl and i want to use it with DBI:mysql module. I want to connect to my sql server and do some data manipulation like , insert, update and delete. I read the DBI documention but i cant get through to get my script working. any help is needed. below is my script. #!/usr/bin