473,320 Members | 1,921 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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_description.

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_description 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_description 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 1587

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

Similar topics

3
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...
2
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...
2
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 ...
8
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...
0
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...
5
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...
0
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 '...
3
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...
5
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.