Re: a few questions

new topic     » goto parent     » topic index » view thread      » older message » newer message

I understand now... I think the doc is misleading... it says "Return the key
portion of record number i in the current table" and the key of record x+1
is not the same as key(x+1).. It should probably say "Return the i'th key in
the current table".

thanks...

..george

----- Original Message -----
From: "Irv Mullins" <irvm at ellijay.com>
To: "EUforum" <EUforum at topica.com>
Subject: Re: a few questions


>
> On Monday 30 July 2001 09:22, George Walters wrote:
> >
> > Irv, If I have a particular key  'abc' and it's record and I want the
next
> > record (in sorted order) it will not necessarily be db_record_key(x+1) ,
> > the next record's key. The records are not in sorted order, so the next
> > record's key will not be the next (sorted) key.
> > Am I understanding this correctly? And if you want to start at the
> > beginning, you don't have a key. Do you use a key of "" to position to
the
> > beginning of the file?
>
> No. The record keys are always stored sorted.
> If you put in a random list of names:
> Zorro
> Bubba
> Norton
> Chuck
> Al
>
> Then they will be stored in the database as:
> 1. Al
> 2.. Bubba
> 3. Chuck
> 4. Norton
> 5. Zorro
>
> Therefore, to start at the beginning of the list, retrieve record 1,
> For the list above, db_record_key(1) would return Al
> db_record_key(db_table_size()) would return Zorro.
>
> Regards,
> Irv
>
>
>
>
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu