[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.2

query all tables using hard coding

Asked by alexanderax in Cold Fusion Markup Language, Adobe Dreamweaver, ColdFusion Application Server

Tags: cfml under macromedia dreamweaver

I got one MasterIws table and below are the codes using query. In one of my database named dbl_IWS.mdb inside contains 95 tables with alot of data. The tables name was named as the starting of the drawing number. (ie. 310A, 350B, 36C, 320E, AFTH32, GH_85 etc...) I was able to query all the drawing number successfully using one query for all data when using drop down list and textbox BUT what i want is to do hard coding to query for all the tables using each table as one query only. Because now is very troublesome for me to copy and paste all the data into one table (MasterIWS) and setting each of them with an unique ID. My MasterIWS table got one column named DN with data set as (ie. 350B, 360C, 310A, ETC..) So how should i query all those tables? I want the drop down list to be the starting of the drawing number. I have already create one table named (number1) and under it's column named (STARTING) have 350V, 310A, AB1_23, etc... Which means when user select 310A, it will show all the drawing number that starts with 310A only. I set an unique number to get all those data when using one table which works fine for me but now i what i want is to query all tables instead of just using one MasterIWS table. I also want user to be able to search for the specific number when they type in the textbox and select the drop down list by using one button only. I've uploaded the photo for reference. (I do not want to use UNION OR JOIN. Right now i'm using Microsoft access and Macromedia Dreamweaver 8 Coldfusion [cfml]. )
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
<!---Search_results.cfm--->  
 
<CFset index="1">     
<CFIF not IsDefined("Form.txtBoxValue")>
      <cfquery name="get_All" datasource="DSN_db1_IWS">      
      select *      
      from MasterIWS
      </CFQUERY>
      <CFQUERY NAME="get_total" datatsource="DSN_db1_IWS">      
      select count(*) as CurrentRows      
      from MasterIWS     
      </CFQUERY>
 
 <CFELSE>
         <CFIF not IsDefined("Form.Search")>
              <CFQUERY name="get_All" datasource="DSN_db1_IWS">      
              select *      
              from MasterIWS
              WHERE     MasteIWS.DN = '#Form.MasterIWSinput#' AND Doc_No LIKE <CFQUERYPARAM cfsqltype="cf_sql_varchar" value="%#Form.txtBoxValue#%">
         Order by Doc_no
       </CFQUERY>
       <cfquery name="get_total" datatsource="DSN_db1_IWS">      
        select count(*) as CurrentRows      
        from MasterIWS 
        WHERE     MasteIWS.DN = '#Form.MasterIWSinput#' AND Doc_No LIKE <CFQUERYPARAM cfsqltype="cf_sql_varchar" value="%#Form.txtBoxValue#%">
      </cfquery>
 
<CFELSEIF #Form.Search# is "IWS Search">
         <CFQUERY name="get_All" datasource="DSN_db1_IWS">      
              select *      
              from MasterIWS
              WHERE     MasteIWS.DN = '#Form.MasterIWSinput#' AND Doc_No LIKE
       <CFQUERYPARAM cfsqltype="cf_sql_varchar" value="%#Form.txtBoxValue#%">
       </CFQUERY>
     <CFQUERY NAME="get_total" datatsource="DSN_db1_IWS">      
      select count(*) as CurrentRows      
      FROM  MasterIWS
       WHERE     MasteIWS.DN = '#Form.MasterIWSinput#' AND Doc_No LIKE
       <CFQUERYPARAM cfsqltype="cf_sql_varchar" value="%#Form.txtBoxValue#%">     
      </CFQUERY>
 
<meta http-equiv="Contecnt-Type" content="text/html; charset=iso-8859-1">
<style type="text/css"> body {background-color=#A7EF9228bdee; }  .style2{color:#b51111} </style></body> 
<table width....> <tr> 
<th width......>Number of files Generated:</br> <font....><cfoutput query="get_total"><b>#get_total.CurrentRows#</cfoutput> </tr></th></table><br> 
 
<table width...> <tr> <th width.....><font...>Search Results:</font></th> <tr> <td width...><font....>S/N</font></td> <td...><font....>DOC_NO</font></td> <td...><font....>DESCRIPTION</font></td> <td...><font....>STATUS</font></td> <td...><font....>REMARKS</font></td> </tr> 
 
<cfoutput query="get_All"> 
<tr> <td align=""....> 
     <cfScript>         
      writeoutput(index);         
      index=index+1; 
</cfscript> </td>
<td.....><a target="rightBottomFrame" href="../drawing search/mainSearching.cfm?Doc_no=#get_All.doc_no#">#get_FirstNo.DOC_NO></a>< /font></td> <td....><font..>#get_All.DESCRIBE#</font></td> <td....><font..>#get_All.STATUS#</font></td> <td....><font..>#get_All.REMARKS#</font></td> </TR></cfoutput></table></body></html>    
 
 
<!---searching.cfm--->
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 
<html> 
<head> 
<title>Searching</title> 
<meta http-equiv="Contecnt-Type" content="text/html; charset=iso-8859-5"><style type="text/css"> 
body {  background-color:#28bdee; } 
.style1{  color: #9be094;  font-weight: bold; } 
.style5{color:#C0D259} .style6{color:#D1DE87} 
.style7{color:#C7D76F} </style></head> 
 
<CFQUERY NAME="get_Starting" datasource="DSN_DBL_IWS">
   SELECT Starting
   FROM Number1
   Order By Starting
</CFQUERY>
 
<body class="sub"><br><br>
<form action="Search_Results.cfm" name="get_All" Method="POST" id="get_All" Target="RightBottomFrame">
 <font color....><span class="style5"><span class="style6"><strong>Document Number:</strong></span><br><br> 
<font color="#FFFFFF"></font> 
 
<Select name="MasterIWSinput" style="width:84%;">
<option selected value="BeginsNo">Number Begins With...</option>
<cfoutput query = "get_Starting">
<option>#STARTING#</OPTION>
</CFOUTPUT>
</SELECT><BR>
 
<INPUT NAME="txtBoxValue" type="text" size="25" style=:65%;" id="txtBoxValue"><br>     
<input type="Submit" Name="Search" value="IWS Search" style="width:70%;"><br><br> 
<input name="btnReset" type="reset"  value="clear" style="width:70%;"><br><br>    <br><br></td></tr></table></form></body></html>
[+][-]05/03/09 08:53 PM, ID: 24292412Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: Cold Fusion Markup Language, Adobe Dreamweaver, ColdFusion Application Server
Tags: cfml under macromedia dreamweaver
Sign Up Now!
Solution Provided By: pinaldave
Participating Experts: 1
Solution Grade: B
 
[+][-]04/28/09 08:51 PM, ID: 24257233Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/29/09 12:15 PM, ID: 24263742Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/29/09 05:53 PM, ID: 24266077Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/29/09 08:39 PM, ID: 24266774Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/01/09 04:53 AM, ID: 24278278Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/01/09 08:26 AM, ID: 24280368Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/03/09 09:23 PM, ID: 24292497Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/03/09 09:27 PM, ID: 24292514Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/04/09 11:07 AM, ID: 24297590Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/05/09 05:22 AM, ID: 24303834Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92 - Hierarchy / EE_QW_3_20080625