Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Professional
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 9th, 2010, 09:14 AM
Registered User
Points: 1,897, Level: 17
Points: 1,897, Level: 17 Points: 1,897, Level: 17 Points: 1,897, Level: 17
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2005
Location: Mumbai, Maharastra, India.
Posts: 352
Thanks: 14
Thanked 0 Times in 0 Posts
Send a message via Yahoo to rupen
Default Insertion in sorted multi-dimensional array.

Requirement:
There is a multidimentional sorted array as shown below:

If user changes sort index of existing product then auto update relevant product's sort index. e.g.

If there are six products with respective sort ids as 1,2,3,4,5,6.
If user changes Product2's sort index to 6 then :

Product id............Sort Index
-------------------------------------------
Product1............1
Product2............2 <-- 6
Product3............3
Product4............4
Product5............5
Product6............6

Result after changing sort index to 6 for Product 2:

Product id............Sort Index
-------------------------------------------
Product1............1
Product3............2
Product4............3
Product5............4
Product6............5
Product2............6

As we can see, the other array elements are auto adjusted.

One can certainly program it, but do anybody have done this before, if so can you please guide or provide sample code?
Reply With Quote
  #2 (permalink)  
Old October 31st, 2010, 12:59 PM
J_P J_P is offline
Authorized User
Points: 48, Level: 1
Points: 48, Level: 1 Points: 48, Level: 1 Points: 48, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2009
Posts: 12
Thanks: 0
Thanked 1 Time in 1 Post
Default

just google:

vbscript sort array

you will find many examples to choose from
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
two-dimensional array Lizane Java Basics 4 May 23rd, 2007 09:35 AM
How to get least value numbers in a sorted array? ashokparchuri Other Programming Languages 3 December 5th, 2006 09:25 AM
push to multi dimensional harpua PHP How-To 0 December 4th, 2006 01:47 AM
resizeable multi-dimensional array 132591 C++ Programming 2 October 20th, 2006 05:07 PM
2 dimensional array venterjo General .NET 2 January 23rd, 2005 09:04 AM



All times are GMT -4. The time now is 10:07 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.