|Do you know where your variables are?|
DBD::SQLite select syntax problemby zentara (Archbishop)
|on Feb 12, 2004 at 23:19 UTC||Need Help??|
zentara has asked for the wisdom of the Perl Monks concerning the following question:
Hi, I'm trying to set up an SQLite db. Everything is going fine except for my select statement. What is bothersome, is that it works from the sqlite c binary, but not from Perl. I have some sample data already loaded, and here is my syntax which works from the c binary.
And my select statement:
It's just what I want.
Now if I do the same thing from Perl, I get a error.
I get the error:
now the only clue I have, is that I must put single quotes around 'ScottyZ', when I run the sqlite c program; and if I omit the single quotes, the c version of sqlite throws the same error as the Perl script.
I've tried all sorts of different syntax in $cmd, trying to isolate $key_sel, but to no avail. I've changed = to == and eq , so that isn't the glitch.
I do get my script working with the following hack:
So what am I doing wrong in Perl, should I not use $sth?