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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

multiple pages, queries, tables - passing data properly

Status
Not open for further replies.

ktownchik

Technical User
Mar 29, 2003
6
CA
hello

ok - tomorrow i will go out and buy a reference manual but for now...

i have a database with interlocking tables... 7 of them

my main tables shows up from which you can select a field and the next table shows up with just that matched parameter

right now i'm passing them through URLs... so here is an example.

main page:
<a href=&quot;Detailsite.cfm?CountyFIPS=#strCountyFIPS#&quot;>#strCountyFIPS#</a>

then on the next page (uses a different tables from the same db)

<!--- THis page requires a CountyFIPS value in the URL--->
<cfparam name=&quot;URL.CountyFIPS&quot; type=&quot;numeric&quot;>

<!---Create query from which to selelct data--->
<cfquery name=&quot;ColoradoPointSite&quot; datasource=&quot;Colorado&quot;>
SELECT * FROM tblPointSI
<!---Use data matching selected CountyFIPS --->
WHERE strCountyFIPS LIKE '%#CountyFIPS#%'
ORDER BY strSiteID
</cfquery>


ok :)
so far so good.. honkey dorey
BUT

now i need to use a third table...

it need to have the same countyFIPS AND also a new criteria of SiteID - what syntax should i be looking at? BUT i have no way of knowing what CountyFIPS (1st table) the user will select so i cannot make that option static, or have a hard link.

right now i have


<!---Create query from which to selelct data--->
<cfquery name=&quot;ColoradoPointEmissionUnit&quot; datasource=&quot;Colorado&quot;>
SELECT * FROM tblPointEU
<!---Only select the data where your User has clicked before--->
WHERE strCountyFIPS LIKE '%#CountyFIPS#%'
WHERE strSiteID LIKE '%#SiteID#%'
ORDER BY strEmissionUnitID
</cfquery>


but OF COURSE the page has no idea what '%#CountyFIPS#%' are :-(

please help
i know its a long scary post.

 
Couldn't you just pass the CountyFIPS through the URL again on the second page? So, for all your links on the second page, you'd have something like

Code:
nextpage.cfm?CountyFIPS=#URL.CountyFIPS#&SiteID=#YourSiteID#

Does this make sense? Am I understanding your question correctly?

Misty

 
thanks :)
i've tried doing that but then for some reason it doesn't recognize them as separate values.
i'm really not sure what i'm doing but thanks anywyas... i finally bought a reference manual so hopefully that helps me out a little

though idon't think i separated them iwhta DOT.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top