LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-06-2009, 09:45 AM   #1
pwd_pwd_omg_pwd
LQ Newbie
 
Registered: Oct 2008
Location: Cardiff, Wales
Distribution: Jaunty
Posts: 20

Rep: Reputation: 0
mysql, duplicate entry error with unknown character: �


Im running a pipeline (est2uni) which does some analysis and then puts the output into a mysql database. the database structure is already produced from a sql file they supplied, so that is correct but im getting the error:

Quote:
DBD::mysql::st execute failed: Duplicate entry �' for key 1 at /usr/local/bioinf/est2uni/perl/pipe_db.pm line 1153.
I know that duplicate entry would usually be resolved by an auto increment function, but i need the id's that it imports to stay the same, and I have no idea what the � is supposed to represent

Heres the point where its reading in the .pm :
Code:
        #should we clean previous clones?
        my $clean=read_config($config,'do_clean_db','');
        if ($clean){
                #rflp table should be completely cleanned
                my @tables=($table);
                clean_tables($config,@tables) or return 0;
        }

        my $only_clean = read_config($config,'only_clean','');
        if (!$only_clean){
                #we assume that there is no previuos clone info in the database
                my $st="INSERT INTO $table (name,library) VALUES (?,?);";
                $sth=prepare_st($dbh,$st);

                foreach my $clone (keys %clone_info){
                        $sth->bind_param(1,$clone);
                        if ($clone_info{$clone} eq 'none'){
                                $clone_info{$clone}=undef;
                        }
                        $sth->bind_param(2,$clone_info{$clone});
                        $sth->execute or return 0;
with the last line being 1153 which it refers to.

Ill be thankfull for any help. been stuck on this for a while. (and ive just put the RAM up from 1gb to 4gb today so i want to get it whirring!)

Dan

Last edited by pwd_pwd_omg_pwd; 02-06-2009 at 09:45 AM. Reason: i put 1152 insead of 1153 at the end. number dyslexia!
 
Old 02-09-2009, 05:31 AM   #2
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,552

Rep: Reputation: 103Reputation: 103
Hmm doesn't that error mean that somewhere a query like this is trying to execute:

Code:
insert into whatever set id = ,;
??

This is invalid SQL, as far as I know.... what type of column is the ID column?
 
Old 02-11-2009, 04:38 AM   #3
pwd_pwd_omg_pwd
LQ Newbie
 
Registered: Oct 2008
Location: Cardiff, Wales
Distribution: Jaunty
Posts: 20

Original Poster
Rep: Reputation: 0
fixed.

Ive figured out the problem now guys. It was a duplication, but it was trying to put in the alphabetic files and the chromatogram (images) files too so it just buggered it up royaly. Now all i have to do is get it to take the files but thats for another day!
 
  


Reply

Tags
mysql


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mysql Error: Duplicate entry '0' for key 1 w0lv3r1ne Linux - Server 1 08-17-2006 03:30 AM
Trying to restore mysql dump, error 1062: Duplicate entry mackdav Linux - Software 1 04-25-2006 03:02 AM
mysql dupe entry error, how to avoid? hydro Linux - Software 0 09-20-2003 12:08 PM
Unknown sendmail log entry error robeb Linux - General 5 06-26-2003 05:23 PM
Error: Acct: Couldn't insert SQL accounting START record - Duplicate entry '15212' fo ethanchic Linux - Software 0 04-11-2003 10:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration