Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: database table named 'with'

by !1 (Hermit)
on Jan 26, 2005 at 04:44 UTC ( #425114=note: print w/replies, xml ) Need Help??


in reply to database table named 'with'

No, there is nothing special about the way perl is handling it. "with" is a reserved word in mysql, as shown here. The solution is to surround "with" with backticks (`) as described here. Thus your query would become something like:

my $sth = $dbh->prepare("insert into blah (...,`with`) values(?,?)"); ...

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2021-10-25 11:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (89 votes). Check out past polls.

    Notices?