Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 9th, 2010, 09:14 AM
Registered User
 
Join Date: Apr 2005
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?
 
Old October 31st, 2010, 12:59 PM
J_P J_P is offline
Authorized User
 
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





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





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