Ask a Question related to Coldfusion Database Access, Design and Development.
-
quiero mas #1
Missing something in this query
have a list of symptoms - I want a user to be able to click on the
first letter of their symptom. Next a list of all the symptoms with
the corresponding letters are pulled from the database. Actually have
got a drop down (distinct) working for this but on the result page i get all
the
results - think it isnt filtering properly - i have also tried removing the
first % in %#FORM.Letter#%'
but to no avail.
click A - list of A with check box
in addition i would like a check box to be placed next to each symptom.
<Got this happening too> #Thanks Dan
Problem: Result page pulls all the entries and doesnt sort by the
distinct query from the search page
Would most appreciate some help(again)
regards the nOOb
Search page
<cfquery name="SymptomS" datasource="Symptom">
SELECT Distinct Letter
FROM tsymptommaster
</cfquery>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
</head>
<form name="SymptomS" method="post" action="ResultSymptom.cfm">
<input type="submit" name="Submit" value="Submit">
<select name="symptom">
<cfoutput query="SymptomS">
<option value="#SymptomS.Letter#" <cfif
(isDefined("SymptomS.Letter") AND SymptomS.Letter EQ
SymptomS.Letter)>selected</cfif>>#SymptomS.Letter#</option>
</cfoutput> </select>
</form>
</html>
result page
<cfparam name="FORM.Letter" default="1"><cfquery name="q1"
datasource="Symptom">
select symptom
from tsymptommaster
</cfquery>
<cfquery name="q2" datasource="Symptom">
SELECT *
FROM tsymptommaster
WHERE Letter LIKE '%#FORM.Letter#%'</cfquery>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Result Symptom</title>
</head>
<cfoutput query="q2">
<input type="checkbox" name="symptomidlist" value="#symptom#">
symptom</cfoutput>
</html>
quiero mas Guest
-
#38976 [NEW]: missing last character when fetching query
From: zolfi at parspooyesh dot com Operating system: fedora linux 5 PHP version: 5.1.6 PHP Bug Type: PDO related Bug... -
Query to find a missing number
Hello, I need to write a query to find out a set of missing number in a given sequence. Eg : a Column in some table has the following... -
Fields missing in query
I am having an odd problem. I have a table in MSSQL named Residential. In this table I have 32 fields (all of which I use) for some reason all of... -
Query of Query Missing Some Data
Hey Folks, I'm not sure that my message title or topic summary make much sense, but I'll attempt to expound upon them here and with any luck someone... -
Access: (missing operator) in query expression
Hi! I operate a database where visitors do inputs directly from the web thru a form. One field has the datatype (property?) Memo and I have not... -
Dan Bracuk #2
Re: Missing something in this query
How many symptons are we talking about anyway?
Also, if a user of your site does everything right, what should he eventually see?
Originally posted by: quiero mas
have a list of symptoms
Dan Bracuk Guest
-
quiero mas #3
Re: Missing something in this query
?i Dan - Quick run down
1. multilingual
2. 250 symptoms in each language
3. for the moment just trialing in two. Japanese and English
objective
1. user can click on the first letter of the symptom they think the have
2. then a list of all the associated symptoms is displayed with a check box
next to it.
3. they choose one of more of the symptoms and submit this to another page.
4. i want it to be possible to go back to the index page and click on another
letter
e.g my symptoms: headache and backache
first i click on h - check headache then submit it to an intermediary page
second return to the index page click b check backache the nmove on to the
page where headache has also been sent.
the user then completes some personal information and medical history
next they can print and/or Email their information a participating Hospital,
Pharmacy or Clinic.
As you know this is a voluntary project so i am learning everything myself and
as you have probably worked out with very little background experience. Ive
been over here since 1996 so i have a good knowledge of Japanese and
translation so that sideis a breeze compared to this.
Thanks again for you patience Dan and others
Regards Mark
quiero mas Guest
-
Dan Bracuk #4
Re: Missing something in this query
If your database supports substrings, do this on the first page
select distinct substr(sympton, 1, 1) firstletter
from symptons
<cfoutput query="q1">
<a href="page2?letter=#firstletter#">#firstletter#
Then on page2, do this
select symptom from symptons
where symptom like '#url.firstletter%#'
and so on.
Originally posted by: quiero mas
?i Dan - Quick run down
1. multilingual
2. 250 symptoms in each language
3. for the moment just trialing in two. Japanese and English
objective
1. user can click on the first letter of the symptom they think the have
2. then a list of all the associated symptoms is displayed with a check box
next to it.
3. they choose one of more of the symptoms and submit this to another page.
4. i want it to be possible to go back to the index page and click on another
letter
e.g my symptoms: headache and backache
first i click on h - check headache then submit it to an intermediary page
second return to the index page click b check backache the nmove on to the
page where headache has also been sent.
the user then completes some personal information and medical history
next they can print and/or Email their information a participating Hospital,
Pharmacy or Clinic.
As you know this is a voluntary project so i am learning everything myself and
as you have probably worked out with very little background experience. Ive
been over here since 1996 so i have a good knowledge of Japanese and
translation so that sideis a breeze compared to this.
Thanks again for you patience Dan and others
Regards Mark
Dan Bracuk Guest
-
quiero mas #5
Re: Missing something in this query
The advice and your time is much appreciated. Ill do some research into these.
Thanks alot
Regards Mark
quiero mas Guest
-
finger5844 #6
Wrong
Couldnt agree less. Totally off the chart. You can PM if you want, I
will try to explain better...
finger5844 Guest



Reply With Quote

