Just to add some complexity to this and really throw you for a loop, there is a 
small chance you may want three tables.  This would be desirable if multiple 
words use the same url.  I don't know how unique the url's are in your data, 
but if any of them are repeated you would probably want an "URL" table.  The 
advantage of this is that if a url changes (you know that almost never happens 
on the web, but just in case :-) ) you can change the url in one place and all 
the words that refer to it change.  You would then have a database design 
something like this.

WORD_TBL
ID (int autnumber)
WORD (char 32)

URL_TBL
ID (int autonumber)
URL (char 64)

WORD_URL_JOIN
WORD_ID (FK WORD_TBL.ID)
URL_ID (FK URL_TBL.ID)

And your select query would become something like this:
SELECT
        WORD,
        URL
FROM
        WORD_TBL,
        URL_TBL,
        WORD_URL_JOIN
WHERE
        URL_TBL.ID = WORD_URL_JOIN.URL_ID
AND     WORD_URL_JOIN.WORD_ID = WORD_TBL.ID
AND     WORD_TBL.ID = <cfqueryparam value="#myWordVariable#" 
CFSQLTYPE="SQL_DB_CHAR">

Just to take the example to the next possible level.


--------------
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA

"C code. C code run. Run code run. Please!"
- Cynthia Dunning



Confidentiality Notice:  This message including any
attachments is for the sole use of the intended
recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the
intended recipient, please contact the sender and
delete any copies of this message. 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:184030
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to