![]() |
|
Just another Perl shrine | |
PerlMonks |
Re^2: Quickest way of fetching a Single row and column in MySQL using DBIby cees (Curate) |
on Aug 07, 2006 at 01:04 UTC ( [id://565881]=note: print w/replies, xml ) | Need Help?? |
Although your version works, it is potentially open to an SQL injection attack through the $username variable. With DBI that is easy to avoid by using placeholders. Also, I think you want selectrow_array (selectrow_arrayref returns a reference to an array, wheras selectrow_array will return a list, or just a scalar value if you are selecting a single column).
In Section
Seekers of Perl Wisdom
|
|