"be consistent" | |
PerlMonks |
Re: Re: Re: Getting MySQL Data into an Array.by Corion (Patriarch) |
on Jan 06, 2002 at 21:53 UTC ( [id://136692]=note: print w/replies, xml ) | Need Help?? |
There are some nitpicks I do have with this tutorial. First of all, it's the absence of use strict;, which is not really good in code that will be cut, pasted and modified, possibly with typos. The mix of implicit return values and explicit return ($sth) statements is also likely to bother the newbie. The author also seems to never have heard of the quote method (see http://mysql.turbolift.com/mysql/DBD_3.21.X.php3#quote for example). I'm not sure if this method is available under every database driver, but it's at least worth a mention. Another problem comes from the naive error-handling approach when mixing CGI and the rest of the world - the author prints the full error message back to the end user, something which will at best confuse the end user, in the worst case this will provide crucial information to an attacker. Of course, the topic of the tutorial is databases and not CGI, but why mix in CGI in the first place ?
In Section
Seekers of Perl Wisdom
|
|