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

Re: DBI and MySQL

by dmmiller2k (Chaplain)
on Jul 12, 2002 at 14:04 UTC ( [id://181272]=note: print w/replies, xml ) Need Help??


in reply to DBI and MySQL

Perhaps this isn't a problem, but it jumped out at me...

No one else mentioned this, but it's possible your extra 'where' keyword is also masking a quoting issue. In the following line:

$sql = "SELECT * FROM dataflex where attorney = '$INPUT{'attorney'}' a +nd where issue = '$INPUT{'issue'}'";

note that the single quotes surrounding $INPUT{'attorney'} and $INPUT{'issue'} conflict with those surrounding the hash keys, 'attorney' and 'issue'. Since hash keys may be bare words, you can circumvent this by removing the single quotes around both 'attorney' and 'issue' (of course getting rid of the extra 'where'):

$sql = "SELECT * FROM dataflex where attorney = '$INPUT{attorney}' and + issue = '$INPUT{issue}'";

dmm

If you GIVE a man a fish you feed him for a day
But,
TEACH him to fish and you feed him for a lifetime

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2024-04-24 17:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found