Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. 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 Databases 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 February 15th, 2005, 12:06 AM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 240
Thanks: 0
Thanked 1 Time in 1 Post
Default paging 001+001=002 <> 2

I have a database table with field as a three digit number like 001 (I did that because when I was searching for example 1, it would bring all the numbers which included 1, like 1, 10, 11, 12...100...). I have the following so far:
Code:
<%pagingurl = "<a href=""thechapter.asp" & "?number=" & rs("chapter")
     pagingurl = pagingurl & "&recordType=" & rs("recordType")
                If Keyword <> "" then pagingurl = pagingurl & "&Keyword=" & Keyword
                If Keyword <> "" then pagingurl = pagingurl & "&Keywordb=" & Keywordb
                If Keyword <> "" then pagingurl = pagingurl & "&Keywordc=" & Keywordc
                If Keyword <> "" then pagingurl = pagingurl & "&Keywordd=" & Keywordd
                If Keyword <> "" then pagingurl = pagingurl & "&Keyworde=" & Keyworde
                If Keyword <> "" then pagingurl = pagingurl & "&Keywordf=" & Keywordf
If spoke<> "" then pagingurl = pagingurl & "&spoke=" & spoke


If   request.QueryString("book_spoke")="Book_Spoke" then pagingurl = pagingurl & "&book_spoke=Book_Spoke"

If   request.QueryString("chapter_spoke")="Chapter_Spoke" then pagingurl = pagingurl & "&chapter_spoke=Chapter_Spoke"

If   request.QueryString("verse_spoke")="Verse_Spoke" then pagingurl = pagingurl & "&verse_spoke=Verse_Spoke"

pagingurl = pagingurl & "&text_data=yes" 
pagingurl = pagingurl & """>" & rs("book_title") & "&nbsp;" & rs("chap") + 1 & "</a> "

response.write pagingurl%>
<%pagingurl = "<a href=""thechapter.asp" & "?number=" & rs("chapter")
(1st line)
I need to somehow add 001 from rs("chapter") with 001 so that it may equal to 002 and not 2. How can I fix that?

Learning of our true origins.

I feel sorry:

http://www.infowars.com/articles/wor...eknowledge.htm

Foreknowledge of A Natural Disaster
Washington was aware that a deadly Tidal Wave was building up in the Indian Ocean
 
Old February 15th, 2005, 05:34 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
Default

You could add the two numbers, then convert to a string & pad...
Code:
totalInt = rs("chapter") + otherInt
totalStr = Right("000" & totalInt, 3)
HTH,

Chris







Similar Threads
Thread Thread Starter Forum Replies Last Post
Get files with 001, 002, 003 aso. names.. Rafter Visual Basic 2005 Basics 1 March 15th, 2007 06:20 AM
<style> tags in a <body> vs. <div> bcat BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 1 March 27th, 2005 08:50 AM
<alt=> in paging possible? gilgalbiblewheel Classic ASP Databases 5 January 25th, 2005 02:49 AM
<marquee><b>About CHAT App. in PHP4</b></marquee> Ramkrishna PHP How-To 1 September 11th, 2004 07:01 AM
<STRONG> vs <B> and <EM> vs <I> anshul HTML Code Clinic 12 September 1st, 2004 05:22 PM





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