Hi, I have a variable setup as $pid and i've tried to call this in the prepare part of the DBI module but i'm get an "Unknown column $pid" syntax error. Probably $pid was passed as a string instead of a variable inside the prepare (''). Anyone has an idea of how i can fix this? Thanks.
DBD::mysql::st execute failed: Unknown column '$pid' in 'where clause' at createThesaurus.pl line 33, ------------------------------------------------------- while ( <NEW> ) { next if $. == 1; # exclude header chomp; my ($pid,$thesaurus_from,$thesaurus_to,$thesaurus_type) = split /\|/; #Update override_exclude set th_flag="N" to indicate that thesaurus entries #have been added to sierra2_thesaurus.xml use DBI; my $dbh = DBI->connect("dbi:mysql:endeca_tracking",$user,$password); my $sth = $dbh->prepare('update override_exclude set th_flag="N" where pid=$pid') or die "Couldn't prepare statement" .$dbh->errstr; $sth->execute; __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com