Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: Concrete SQL from SQL::Abstract?

by benizi (Hermit)
on Sep 26, 2010 at 07:11 UTC ( [id://862056]=note: print w/replies, xml ) Need Help??


in reply to Re: Concrete SQL from SQL::Abstract?
in thread Concrete SQL from SQL::Abstract?

Thanks. Hadn't logged on in a while (unfortunately).

You should localize $_ there.

local $_ = $sql;

instead of:

$_ = $sql;

This has some quoting problems, but it's not your code's fault. Since SQL::Abstract doesn't use $dbh->quote_identifier, it can return invalid SQL. E.g. MySQL (at least) allows question marks in table names: mysql -Dtest -e 'create table `o rly?` (a int)'

In the end, it didn't matter much anyway, as I was stuck doing most of my work in PHP. In that realm, nothing holds a candle to DBI

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://862056]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2024-04-16 12:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found