Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 2.x support forum
 Helicon Tech : ISAPI_Rewrite 2.x support forum
Subject Topic: Mapping Primary Key to Other SQL Columns? Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
pjtomli1
Newbie
Newbie


Joined: 20 June 2008
Location: United Kingdom
Online Status: Offline
Posts: 2
Posted: 20 June 2008 at 11:21am | IP Logged Quote pjtomli1

I've developed a website with a search facility. The form submits (using "get" method) and outputs something like:

search.asp?category=7&subcategory=38

You may gather that I'm using IDs here, rather than names. It's simple enough to rewrite the URL as:

search/7/38/

But what I really want to do is write the URL to something like:

search/birds/eagles/

Whereby birds and eagles are the category and subcategory names, respectively. I've set up another column in each table to represent a URL-safe format for each category and subcategory name, but without rewriting my SQL to cease using the primary key (ID) to search, is there a way I can get the URL to show as above?
Back to Top View pjtomli1's Profile Search for other posts by pjtomli1 Visit pjtomli1's Homepage
 
pjtomli1
Newbie
Newbie


Joined: 20 June 2008
Location: United Kingdom
Online Status: Offline
Posts: 2
Posted: 20 June 2008 at 11:29am | IP Logged Quote pjtomli1

Let me just answer my own post here! There doesn't appear to be a way, other than rewriting my SQL queries.
Back to Top View pjtomli1's Profile Search for other posts by pjtomli1 Visit pjtomli1's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum