Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

URL ID Query

Status
Not open for further replies.

ITGL72

MIS
Joined
Jul 2, 2001
Messages
105
Location
US
CF seems to be really beating me up the last few days. Looking for assistance in what I am missing this time around.

I have a link that points to a page with a URL ID in it for a next page query, looks like this:

catpage.cfm?CATID=3

on 'catpage.cfm' I start a query that works with the CATID=3 (for this example)


<CFQUERY NAME=&quot;GETCAT&quot; DATASOURCE=&quot;GLKB&quot;>
SELECT *
FROM KnowledgeBase
WHERE 'Category' = '#URL.CATID#'




Below are the only two tables in my database and their datatypes:




TABLE: CATEGORY

FIELD NAME - DATATYPE
---------------------
CATID - Autonumber
CATEGORY - Number





TABLE: KNOWLEDGEBASE

FIELD NAME - DATATYPE
---------------------
CONTENTID - Autonumber
CATEGORY - Number
SUBJECT - Text
CONTENT - Memo
DATE - Date/Time
EDIT - Date/Time




If I run this QUERY, I get a page that displays NOTHING.
There is no ERROR. Just a page with NOTHING. View Source shows
just the HTML code for that page.

Any suggestions? How did I fuddle this code up this time?




 
Well I seemed to get it working.. I just took out the single quotes from:

WHERE 'Category' = '#URL.CATID#'

and made it:

WHERE Category = #URL.CATID#

I guess I was sticking with the thought that anything with a number in the field needs single quotes, oh well...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top