 |
xin-wonder Newbie
Joined: 13 Jul 2008 Posts: 1
|
Posted: Sun Jul 13, 2008 8:38 am
CMUD database records, jumbled |
I keep making database records in CMUD (2.30), save them, then as soon as I come back to look at them they are no longer in the order I wrote them.
Is this a bug or am I doing something wrong?
The strange thing is it doesn't seem to sort the database alphabetically, it seems quite random
Any ideas?
Thanks! |
|
|
 |
Fang Xianfu GURU

Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sun Jul 13, 2008 9:55 am |
This is a feature. Database record variables are hashed in CMUD, like they are in most other languages, and they're sorted by their hash, which is pretty much a random order. If your script relied on the records being in a certain order, it can probably be improved so that it doesn't have to any more.
You can perhaps emulate the behaviour you want by checking the Sort checkbox for the variable. |
|
|
 |
aduan Newbie
Joined: 12 Jul 2008 Posts: 4
|
Posted: Wed Aug 06, 2008 8:47 pm |
Hmm, I have some trouble with this as well, is there any way around it?
|
|
|
 |
Seb Wizard
Joined: 14 Aug 2004 Posts: 1269
|
Posted: Wed Aug 06, 2008 11:34 pm |
Yes, as Fang said, check the Sorted checkbox to sort the database record variable.
|
|
|
 |
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Thu Aug 07, 2008 3:51 pm |
Even better would be to figure out how to get the result you want without expecting a specific order, as Fang said. What exactly do you want to do?
|
|
|
 |
|
|