Gossamer Forum
Home : Products : DBMan : Discussions :

Dbman and Apache Display

Quote Reply
Dbman and Apache Display
Hi,
Running DBman on a Raq4 for sometime, untill the system had to be reinstalled, and the sites backed up.
After reinstalling I now find that Perl is acting very strange and displaying bdman output from Z to A rather than from A to Z.
For eg
The below Sub would display files abc and now it is doing it cba??

Any ideas
foreach $file (@files) {
next if ($file =~ /^\./); # Skip "." and ".." entries..
next if ($file =~ /^index/); # Skip index.htm type files..
$image[$j] = $file;
$j++;

}
Quote Reply
Re: [Syte] Dbman and Apache Display In reply to
The code you have is not meant to display the files in any particular order. You can probably change that by adding a word:

foreach $file (sort @files) {


JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.
Quote Reply
Re: [JPDeni] Dbman and Apache Display In reply to
Hi JPD,

Good to see you still on the forum, and hard at it.
Yes I hear what you are saying about the the sub above howevr it was displaying 1a.jpg 1b.jpg 1c.jpg and does if I move the cgi to any other server, they display a to z but on this Raq4 it is not so, they are z to a and this effects the data in all the file in the img/dir.
In the database I have a field that holds the info on the image position when displaying.
What has changed ? what governs the desending and asending order in an arry, and how would i change them back around

Cheers for any time
Quote Reply
Re: [Syte] Dbman and Apache Display In reply to
Cheers that did the trick.

Thanks for all the help now and in the past
Quote Reply
Re: [Syte] Dbman and Apache Display In reply to
Glad I could help. :-)

Who knows what the issue is. Sometimes when they change versions, the tweaks have unforeseen (or uncared-about) side effects. With sort in the code, though you won't have to worry about any changes that might happen later on.


JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.