Ask a Question related to Coldfusion Database Access, Design and Development.
-
quiero mas #1
select any data from category
Hi everyone - in the following code i want to allow the user t choose 'any'.
Example
choose the area - central
language - any
department - Bronchoesopagology
I dont want the user to have the option for area but it would be useful for
the other categories.
<cfquery name="urlpass" datasource="dependent">
SELECT hospital_name, hospital_id, EnglishAddress, JapaneseAddress,
NihongoName
FROM tHHbyL
WHERE group_id = '#form.area#'
<!--- eg. English = '-1' --->
AND #form.Language# = -1
AND #form.Department# = -1
</cfquery>
by the way this is a triple drop down menu where the menus are not populated
depending on the previous choice.
Regards Mark
quiero mas Guest
-
components: 4 Millions Domains data with Category
Successfull Internet and Direct Marketing products on www.promotionsite.net * NEW * DOMUS Domains Toolkit Fall 2004 - Unique on the Net 4... -
buildingcontrols: 4 Millions Domains data with Category
Successfull Internet and Direct Marketing products on www.promotionsite.net * NEW * DOMUS Domains Toolkit Fall 2004 - Unique on the Net 4... -
flash: 4 Millions Domains data with Category
Successfull Internet and Direct Marketing products on www.promotionsite.net * NEW * DOMUS Domains Toolkit Fall 2004 - Unique on the Net 4... -
[PHP] Category and sub-category logic
Ryan A <mailto:ryan@jumac.com> on Thursday, August 14, 2003 3:21 PM said: Read this http://www.sitepoint.com/article/1105 and you will know what... -
Category and sub-category logic
Hi, I am thinking of making a program for personal use which does a very simple thing, just displays listings under categories, eg: under main... -
MikerRoo #2
Re: select any data from category
The values are all numeric, set by selects?
If so, then your "any" choices should set values of "" or " " or "any".
(Don't use a magic number!)
Then the query becomes:
WHERE group_id = '#form.area#'
<!--- Either select a specific language or ALL languages. --->
<CFIF IsNumeric (form.Language)>
AND language_id = <CFQUERYPARAM cfsqltype="cf_sql_integer"
value=#form.Language#>
</CFIF>
<!--- Either select a specific department or ALL departments. --->
<CFIF IsNumeric (form.Department)>
AND language_id = <CFQUERYPARAM cfsqltype="cf_sql_integer"
value=#form.Department#>
</CFIF>
MikerRoo Guest
-
MikerRoo #3
Re: select any data from category
Oopsie!
The second condition should read:
AND department_id = <CFQUERYPARAM cfsqltype="cf_sql_integer" value=#form.Department#>
MikerRoo Guest



Reply With Quote

