473,698 Members | 2,602 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

sorting an array based on one of many form fields?

LRW
Subject line confusing? The whole thing is confusing to me.
OK, I think the root of my problem, aside from mental, is array
based...but I'm not even sure what I want to do is even possible. So
if I can get far enough to know that one way or the other, then I can
try to figure out how to do it.

But here's the situation:

Page 1 I have a form with many item rows pulled from a database query.
Among other fields, each row contains a checkbox to select the item
and a text field which contains an item_descriptio n.

On submit, I have it so that every checked item goes onto the next
page where more stuff happens to each item, and the select items end
up in an HTML table as well as a CSV spreadsheet.

Now, because the selected items are pulled from an array based on the
checkbox, the sort order is based on the item's unique ID number. WHat
I'm being asked is if I can have the final results sorted by that
item_descriptio n field I mentioned before. Which can occurr at the end
of the 2nd page's processing, sure.

Well, here's what I have to select the items:
Page 1:
(Each row has this checkbox, with $oim being its id number.)
<input name=\"shipsel[]\" type=\"checkbox \" value=\"$oim\">
<textarea rows=\"5\" name=\"ta$oim\" size=\"30\" tabindex=\"0\"
wrap=\"physical \">".$itemdesc. "</textarea>

Page 2:
if ($shipsel) {
foreach ($shipsel as $v) {
(and then LOTS and LOTS of other stuff....)

You can see each item_descriptio n textfield also has a unique
identifyer for it's name based on the item's ID.

So, I have no idea. If it's possible, do I put the entire collection
of data, each row selected and sent to page 2, into some sort of array
and is there some way to then re-sort all that data based on a column
in that array?

Did this make any sense at all??

Thanks for any help. =)
Liam
Jul 17 '05 #1
0 1605

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2984
by: Paul Kirby | last post by:
Hello All I am trying to update me code to use arrays to store a group of information and I have come up with a problem sorting the multiple array :( Array trying to sort: (7 arrays put into an array) and I want to sort on Descending. This is displayed using print_r() function. Array
2
3074
by: D. Roshani | last post by:
Hello ! I wonder if any one can help me to create a cosomize sorting order (as Macro or added small program in c++ or c# which does this work) in a Access Database contaning one table only words encoded in ISO-8859-1 A a B b C c D d E e É é F f G g H h I i Í í J j 1 2 3 4 5 6 7 8 9 10 11 12 Jh jh K k L l ll M m N n O o P p Q q R r rr S s...
2
2529
by: Jared Cobb | last post by:
Hi all I'm looking for a way to sort a recordset based on a numerical value. I'm better with examples rather than explaining, so please see the following: http://www.jaredcobb.com/example Hopefully that example explains it all. I've searched for tutorials on something like this but I think it's too specialized to find anything. Any help or a point in the right direction would be GREATLY appreciated.
8
3530
by: Mike MacSween | last post by:
tblCourses one to many to tblEvents. A course may have an intro workshop (a type of event), a mid course workshop, a final exam. Or any combination. Or something different in the future. At the moment the printed output is usually going to Word. It's turning into an unholy mess, because I'm having to prepare umpteen different Word templates, and the queries that drive them, depending on what events a course has.
0
3237
by: Brian Henry | last post by:
Here is another virtual mode example for the .NET 2.0 framework while working with the list view. Since you can not access the items collection of the list view you need to do sorting another way... here is my code on how I did it to help anyone starting out get an idea of how to use virtual mode in ..NET 2.0 Imports CrystalDecisions.CrystalReports.Engine Imports CrystalDecisions.Shared
5
1724
by: jean.ulrich | last post by:
Hi I have a continous form that contain 10 fields I would like to be able to sort 3 fields with a command button example columnA can be 100 or 200 or 300 (there are many records of the same value like maybe 200 records have 100 as a value, 85 records have 200 as a value ad so on ColumnB is nearly the same but with sequences like 10 or 11 or 12 so I
0
3124
by: Yarik | last post by:
Hello, Here is a sample (and very simple) code that binds an Access 2003 form to a fabricated ADO recordset: ' Create recordset... Dim rs As ADODB.Recordset: Set rs = New ADODB.Recordset ' Append one or more fields... Call rs.Fields.Append("Number", adInteger)
3
7338
KevinADC
by: KevinADC | last post by:
If you are entirely unfamiliar with using Perl to sort data, read the "Sorting Data with Perl - Part One and Two" articles before reading this article. Beginning Perl coders may find this article uses unfamiliar terms and syntax. Intermediate and advanced Perl coders should find this article useful. The object of the article is to inform the reader, it is not about how to code Perl or how to write good Perl code, but to teach the Schwartzian...
5
4946
by: jrod11 | last post by:
hi, I found a jquery html table sorting code i have implemented. I am trying to figure out how to edit how many colums there are, but every time i remove code that I think controls how many colums there are, it crashes. There are currently 6 columns, and I only want 4. How do I remove the last two (discount and date)? Here is a link: http://www.jaredmoore.com/tablesorter/docs/salestable.html Here is some jquery js that I think...
0
8680
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8609
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9169
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8871
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7738
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6528
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.