Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: MySQL Select problem

by kabel (Chaplain)
on Oct 09, 2002 at 15:02 UTC ( #203943=note: print w/ replies, xml ) Need Help??


in reply to MySQL Select problem

you have a quoting problem. consider this examples:

C:\Perl Testskripte\580>perl use strict; my $name = "kabel"; my $sql_statement = "select * from users where name like '%$name%'"; print "executing [$sql_statement]\n"; ^D executing [select * from users where name like '%kabel%'] C:\Perl Testskripte\580>
or use the qq operator:
C:\Perl Testskripte\580>perl use strict; my $name = "kabel"; my $sql_statement = qq~select * from users where name like '%$name%'~; print "executing [$sql_statement]\n"; ^D executing [select * from users where name like '%kabel%'] C:\Perl Testskripte\580>
or just escape the " characters: \"


Comment on Re: MySQL Select problem
Select or Download Code
Re: Re: MySQL Select problem
by Anonymous Monk on Oct 09, 2002 at 15:13 UTC
    It's not working anyway.
      the only code piece you posted had this quoting error. you should post more code because the error definitively is in another code snippet. post more code and a monk will know the answer. :)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (11)
As of 2014-08-29 22:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (289 votes), past polls