I'm working on a list of members.In my db I have two columns lastName and marriedName
lastName is the member name before they got married and legLastName is their lastname after they got married.
Now I need to display theese two columns in alphabetical order in one list.
If I for example have theese members:
lastName, marriedName
Anderson, Johnson
Petersson, Svensson
Nilsson, Persson
Lindgren, Johnson
I want this result:
Anderson
Johnson (look for Andersson)
Johnson(look for Lindgren)
Nilsson
Persson(look for Nilsson)
Petersson
Svensson(look for Petersson)
I have an online store with about 35,000 products in my database and no matter if you are listing all products in a catagory or viewing search results - all products are displayed in alphabetical order.
My problem is that some of my products start with the word "The" or "A" as the title - so they appear in alphabetical order under the letter "T" or "A". How do I get these items to appear in alphabetical order under the second word but still retain "The" or "A" as the first word of the title?
In other words - having "The World" appear alphabetically under "W" and "A Car" appear under "C" but keeping "The" and "A" as the first words.
Any help would be greatly appreciated. I know a fair bit about ASP/mySQL programming but just can't quite figure this one out.
I have an Access Database with only one table (tblBooks) with 5 fields: id, TestNumber, Book, Author, ReadingLevel, PointValue. I would like to have alphabetical listing of the records displayed by hyperlinks on the top of the page like:
<Previous All | A | B | C | ....| Y | Z | Others Next>
Also would like to have only 25 records per page and bottom page numbering. I know this is a newbie question but I haven't being able to figure it out.
Say I have a DB with 10,000 records and using MySQL paging. I want to put a link setup at the top of the page with the alphabet that will pop to the proper page for each of the letters.
So: 1 A B C D...
Click on 1, goes to page 1, click on A goes to page 7, click on B goes to page 10.. so on so forth. how to find the pages either through an SQL subquery or through ASP. I can write code to make it happen, but I'm looking for a solution that will not hamper performance as much as an array dump and search.
I want to create a page that uses a horizontal alphabetical index such as
a b c .....
so when the user clicks on a letter they go to that section listing the manufacturer names beginning with that letter.
My question is that since I am pulling the names from a database, what is the best way to create the sections for each letter? My first thought is a basic and overkill solution creating a record set for each letter. Would I use arrays?
I know I could just create a separate page for each letter to display the corresponding entries. Would rather have one page at this time.
This is a follow up to a question I asked two weeks ago which I thought was solved but on further inspection I realised it wasn't working fully. I have an ORDER BY on my search results page, the search uses two dropdown menus, the first one is start character (A-Z), and the other is grade.
The problem I have is that the ORDER BY work perfectly when I leave the start character dropdown blank, and when I use the grade selection dropdown, but when I select a start character I get this error message:
An ASP page outputs data from the query "Select ThisAndThat from comments WHERE pageURL='" & pageURL & "' ORDER BY threadID, datesent" (Access mdb) threadID is a string (OK, I know!), which means that 103 displays before 99. Is there a way to write the SQL query to order them numerically? This would be much easier for me than changing the data type and hunting down every page that INSERTS or UPDATES the db.
I am extremely confused about how i should go about doing this: I have puled out current orders and have displayed in a table .These orders have their own order numbers.
Once the person clicks on first order,the order is displayed in a form,where the user can edit the order details and hit submit.
Now when he hits submit ,I want his to go the previous page where the orders are displayed in table ,so that he can click on the next order and process it/OR may be whent he user hits submit ,i want the next order directly to be displayed in the form.
I have a table in my database with several numbers.(2, 5, 8, 0, 9, 0).Now i retrieve the numbers to my page using "order by numbers", and my page look like this.
0 0 2 5 8 9
I want the lowest number to be first, but if the number is 0 (zero) I want it to go to the bottom.Can that be done
I have one table wich has a unique ID feild for each record and other feilds, and another table that has one field that is a number that contains the an ID from the other table and another field that contains some text.
I want to open with sql the first table, but order its records alphabetically by the text in the second table. is it possible? Code:
When I have the recordset in the order as follows, all works well: (Recordset2.Fields.Item("ProductName").Value) (Recordset2.Fields.Item("ShortDescription").Value) (Recordset2.Fields.Item("Thumbnail").Value)
Though if I have the Thumbnail first the description does'nt show.
I've got a site with PayPal and Google Checkout payment options. The checkout page formats two HTML forms, containing bespoke cart code - one posts to PayPal, the other to Google Checkout.When an order is placed, it needs to be updated back on my site, so that the order is marked as 'paid' in the database. When this is done with PayPal, I just provide a hidden field in the form called 'invoice' containing my id number for that transaction. This is returned in my IPN, and I update the database accordingly. However, I can't find a similar field in Google. Their example code all seems to be in XML and is WAAAAAAAAY more complicated than I need it to be. I just need to send a value with my cart code to Google Checkout, and have that value returned after the transaction has completed. I've set up Google Callback, and the page is being called and the order is being written to my google log txt file, I just need this to contain my order id number for the transaction so I can just add the logic to update the database based on this id number.
I've written the following piece of code which is embedded in HTML. For some reason when the script is processed the last response.write statment is displayed before the information in the while loop. I can't seem to figure out why this is happenming.
I am processing the variables from a form submission with a for/next loop. The problem is that the order of the variables are NOT written IN ORDER.
Form field 1 prints fine but then it jumps to Form field 9 and then back to Form field 4 then to Form field 2, etc. IS there a way to process the form variables in a loop in ORDER? field 1, field 2, field 3, etc? Code:
And one clicks on the form, and a SQL statement is executed. However, when I create the SQL statement,
INSERT INTO table1 (FormId,AdvantageId,SortOrder) VALUES (<call from form ID>,<advantages>,<advantsort>)
Then it loops to allow the next phrase to be entered. The statement also takes the value from every other sort order value including that ones that are in different lines. Which in result, gives me an error, saying the insert columns exceed that of the available columns in the table.
how to display search results on my web site in an order that I specify. at the moment there ordered by the primary key which means there all over the place.I know what the code is but I'm not sure how to use it, can anyone give me a quick lesson, does the code need to be on the search page or the results page?
I have a small webadministration system that allow the users to create new menu items in the website´s menu.But when new record is inserted the new menu item allways comes first in the menu (becouse I sort it that way).How can I allow the users to change the menu item order like "home - about - contact". So when new record is created the user could add the new category between "about and contact"?I have Access database and the category table has sort field.
I have a table that is comprised of numbers, and infinity is -1.How can I use descending ORDER BY with -1 coming first?For example, I'd like to have results like this:
I am making my site using MySQL and asp scripting. I have a field in the database with Text as for property. It contains greek letters. My problem is that I cant ORDER them in the page. The ORDER is wrong.I have make this db using phpMyAdmin cp.Is there something I am doing wrong? I am using the statement as I did for Access.