http://qs321.pair.com?node_id=673415


in reply to SQL::Statement confusing literals and identifiers

Does anyone have any workarounds for this?

Does DBD::CSV support select * from Print? That might work (if you do not mind getting columns you do not need), although I cannot test it, your sample fails for me with a rather cryptic error:

DBD::CSV::st execute failed: Error while reading file /tmp/c/Print.csv +: Bad file descriptor at /usr/share/perl5/DBD/CSV.pm line 210, <GEN0> + chunk 1.
:-(

Replies are listed 'Best First'.
Re^2: SQL::Statement confusing literals and identifiers
by ikegami (Pope) on Mar 11, 2008 at 07:22 UTC

    The error you are getting is due to an unrelated bug I fixed locally. It will probably stop manifesting itself if you installed Text::CSV_XS.

    Silly me, of course SELECT * will work, especially since I use fetchrow_hashref. The queries that use WHERE clauses are only done on the "real database" which has no problems with the quotes.

    Update: s/It will probably manifesting/It will probably stop manifesting/

      The error you are getting is due to an unrelated bug I fixed locally. It will probably manifesting itself if you installed Text::CSV_XS.

      Ahh, that would explain it. I installed everything using Ubuntu's apt-get, and yes, that gave me Text::CSV_XS, too.

        That should have been "It will probably stop manifesting". The word "stop" was missing. I didn't expect the XS version to fail.