"be consistent" | |
PerlMonks |
Database Record Orderby vbrtrmn (Pilgrim) |
on Dec 30, 2003 at 22:01 UTC ( [id://317788]=perlquestion: print w/replies, xml ) | Need Help?? |
vbrtrmn has asked for the wisdom of the Perl Monks concerning the following question: Okay, to start I'm dealing with the most poorly designed database I've ever seen. My goal is to cut certain records out of a 1.4 million record database, based on readability of the word. That part is easy! Database Sampling:
Okay, I'll just sort based on how the data comes in via the FLAG. Depending on what the last record was I can determine what to do with the current one... or so I thought. I'm using DBI, binding the column names with $sth->bind_columns(...); and grabbing the rows with while($sth->fetch()) { ... }. The data, which perl outputs isn't in the same order as the database. Output Sampling (first 10 records):
Is there a way for me to get the data out of the DB as it appears OR will it return this way everytime (it always comes back this way). Here's my code (exerpt), for reference:
System Info: Win32, Perl 5.8.2 on Cygwin, standard CPAN DBI module. --
Back to
Seekers of Perl Wisdom
|
|