in reply to Weird DBI behaviour

That is extremely weird, as reading through both examples they should be doing the exact same thing. Can you give examples of the ordering from each (maybe something weird in the data being sorted??)? I will agree that sample 1 is a little weird -- that nested foreach loop is completely useless since @$row only ever has one element in it.

Anyways, i didn't answer your primary question, but i'm curious as to the answer and will watch this thread.. I can also add though that you can use one of DBI's shortcut methods, too:
my $paths = $dbh->selectcol_arrayref(""select path from application_ta +ble where number = ? ORDER BY some_other_number", {}, $number); foreach my $path ( @$paths ){ print "PATH: $path\n"; }

Replies are listed 'Best First'.
Re^2: Weird DBI behaviour
by toadi (Chaplain) on Aug 19, 2005 at 12:21 UTC
    Example i order on next values:
    032/001 032/002 032/003 032/004 032/005
    If I do the query on the database itself the ordering is ok. But if print them with the first piece of perl code I have given it isn't sorted anymore.


    --
    My opinions may have changed,
    but not the fact that I am right