endymion has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks,
first you helped my much with my insert/update problem in mysql. Now I have a little question for the select command.
I'm doing a select in my module by this command:
My csv list is looking like this:if ($what eq "W") { $sth = $dbh->prepare( sprintf "select * from %s where +%s = %s",$dbh->quote_identifier($table),$dbh->quote_identifier($col), +$sel); .....and so on } }
The first column is my primary key (customer article number). I only get the lines back when I'm looking for the article number with only number in it. In this example I get 11111:TEST:TEST:TEST:TEST. The others cause an error Unknown column 'XZ14B' in where clause. But I don't give the article numbers to the column scalar. In the column scalar is really the column name (in this case tab1). Did I make a mistake at the columns values. First column is CHAR(30) or VARCHAR(30) right ? Crosspost: http://forums.mysql.com/read.php?10,558320,558320#msg-558320XZ14B:TEST:TEST:TEST:TEST XX145:TEST:TEST:TEST:TEST 11111:TEST:TEST:TEST:TEST
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Mysql Select Query by Perl
by roboticus (Chancellor) on Jun 22, 2012 at 11:18 UTC | |
by endymion (Acolyte) on Jun 22, 2012 at 12:11 UTC | |
by aaron_baugher (Curate) on Jun 22, 2012 at 12:41 UTC | |
by endymion (Acolyte) on Jun 22, 2012 at 13:08 UTC | |
Re: Mysql Select Query by Perl
by tobyink (Canon) on Jun 22, 2012 at 14:17 UTC | |
Re: Mysql Select Query by Perl
by Anonymous Monk on Jun 22, 2012 at 16:10 UTC |
Back to
Seekers of Perl Wisdom