in reply to Error in quoting?

Check the mysql log when you call this, and see what exactly it prints out (by default, stored at /var/log/mysql.log). Any time I've had conflicts between what I type into the command line mysql client and through DBI, the log has always helped me figure out what I need.

Without more details, of course, my only guess off hand is that you are not quite getting an exact match on the user_name; again, viewing the log would help.

Also, you should try to make sure to catch errors from the db_connect() and the prepare() methods as well; the former most important as if you can't connect to the DB, your code will fail, and for the prepare() to help you catch SQL errors before they are executed.


Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain