Forums

This topic is locked

Precedencial record listing

Posted 24 Sep 2002 14:44:58
1
has voted
24 Sep 2002 14:44:58 Billy Brackman posted:
Hi,

I am trying to create a system where I can specify that a record has order precedence in a record set.

For example: I have 15 accending records in the database & add record 16. But I want record 16 to take prioity over the existing 15 records to be first record to be presented from the record set. This feature can be turned on & off for specific records.

Does anybody know where I can get some information on how to achieve this?

Any help would be appreciated.

Thanks...

Replies

Replied 24 Sep 2002 15:38:00
24 Sep 2002 15:38:00 Dave Clarke replied:
Can you not simply sort the record set by Date descending? This will show the last record entered first.
Replied 24 Sep 2002 15:47:02
24 Sep 2002 15:47:02 Billy Brackman replied:
Its for a real estate agent, & he wants to feature specific properties to over ride price or date order...


<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Can you not simply sort the record set by Date descending? This will show the last record entered first.
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Replied 24 Sep 2002 16:09:32
24 Sep 2002 16:09:32 Dave Clarke replied:
Does he want the users to be able to choose the features?
If so there is tutorial here on sorting databses with dropdowns and checkboxes etc.

www.ultradeviant.co.uk/default.html
Replied 25 Sep 2002 16:55:50
25 Sep 2002 16:55:50 Brent Colflesh replied:
Dear Pumkin,
Add an extra numerical field in your database - ex. "priority" and create an admin area where this field can be edited.

In your SQL query: sort by ID, priority

Regards,
Brent

Replied 26 Sep 2002 10:31:31
26 Sep 2002 10:31:31 Stuart Harland replied:
I found this that returns the value of the autonumber of the record you've just inserted...really handy:

&lt; %
objRS.AddNew

'Get the autonumber as soon as the record is added, before you insert any other data
vMessageID = objRS("MessageID"

'now add you data.
objRS("MessageTitle" = Request("MessageTitle"
objRS("MessageText" = Request("MessageText"
objRS("ForumID" = vMessageID ' this does work
objRS("MessageOrigin" = Request("MessageOrigin"
objRS("MessageDate" = Now()
objRS("MessageLastUpdate" = Now()

objRS.Update

' Then you can redirect to a page to display this new record
response.redirect "displayPage.asp?ID=" & vMessageID
% &gt;

Hope it helps,
Stuart

********************
wheatNOTmeat

Reply to this topic