Michael Coulter wrote:

running the example from the DBD::DBM man page
located under the bit that says

"But here's a sample to get you started."

... yields the results below.

DBD::DBM::st execute failed: No such column 'phone'
DBD::DBM::st execute failed: No such column 'phone'

Ok, found it - an idiotic regex mistake, sorry. The WHERE clause parsing in DBI::SQL::Nano is hosed. There are three fixes, any of them will get around the problem:


* use placeholders in WHERE clauses
* install SQL::Statement (which will then automatically supersede Nano)
* apply the short patch below to DBI::SQL::Nano.pm 0.01

-- START PATCH --
54a55
>     $sql =~ s/\s+$//;
154a156,157
>     $str =~ s/\s+$//;
>     $str =~ s/^\s+//;
176c179
<     my($val1,$op,$val2) = $str =~ /(\S+?)\s*($opexp)\s*(\S+)/is;
---
>     my($val1,$op,$val2) = $str =~ /^(\S.+)\s*($opexp)\s*(\S.+)$/is;
-- END PATCH --


Apologies again.

--
Jeff

Reply via email to