if this is a single query in a web page, at least he avoids the hassle of trying to install DBI and DBD.. :) we all know how many hundreds of messages we see from people who can't get their DBD drivers to make properly.
what kind of overhead does DBI and DBD add to your script in a plain cgi environment where these modules are loaded with each execution? this is ugly, but maybe was a simple solution at the time to the need for a single simple query result in a web page. use PHP instead. :) just kidding. i love the DBI stuff, just wish I didn't have to battle the DBA's to get DBD::Oracle built on sites that have no local oracle database. if this is the only thing changed in the web page, i would love to see the benchmarks. Job -----Original Message----- From: Kevin Old [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 03, 2002 4:28 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: DBI vs. piping query to Mysql Hello all, I am a consultant brought in to manage and restructure some Perl scripts that were written some time ago. The programmer at that time was using the following code to do a query from within a CGI page. ${query} = "SELECT ccyymmddhh FROM inventory ORDER BY ccyymmddhh ;" ; open( INPUT, "echo \"${query}\" | /usr/local/mysql/bin/mysql -A -q -N gso|" ) ; @{ccyymmddhh} = <INPUT> ; chomp( @{ccyymmddhh} ) ; close( INPUT ) ; I think that I should clean this up and reprogram this to use DBD::mysql rather than the way he does it here. Anyone have any idea if it would improve performance? I'd love to hear from people that have gone doing it this way to using DBI. Obviously I can run benchmarks before and after and see which takes longer, and I think that using DBI is not only much easier to read and manage, but probably a little faster. Just seeking the advice of others. Thanks, Kevin [EMAIL PROTECTED] _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]