IBM developerWorks
           ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old June 24th, 2004, 11:23 PM
Sun2000 Sun2000 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 3 Sun2000 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Passing Information in Query

I created a query with a list of names and when i click on one of the names i should be accesed with a new page that would display that person information.. i don't know how to pass the information. do i have to use paramaters? if so, how?

Reply With Quote
  #2  
Old June 25th, 2004, 01:37 AM
hymns hymns is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Melaka, Malaysia
Posts: 51 hymns User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 29 m 57 sec
Reputation Power: 5
Send a message via ICQ to hymns Send a message via Yahoo to hymns
the list link may look like this

somefile.cfm
---
<a href='newpage.cfm?name_id=1'>One of your name list</a>

then create the sql query on ur new page with following
eg. URL.name_id

example:

newpage.cfm
---
<cfquery name='getInfo' datasource='yourdsn'>
select
*
from
your_table_name
where
name_id = '#URL.name_id#'
</cfquery>


<cfif getInfo.RecordCount gt 0>
<cfoutput query='getInfo'>
#TheName#<br/>
#TheAddress#<br/>
#PhoneNum#<br/>
</cfoutput>
<cfelse>
Sorry no person infomation reffer from ur id request
</cfif>
__________________
Making it different not a profit

Reply With Quote
  #3  
Old June 25th, 2004, 08:25 AM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,627 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 10 h 8 m 55 sec
Reputation Power: 53
You want to pass the values in a URL (or in the form action if you are using a form). An example:

http://mysite.com/index.cfm?myvariable=10

Passes a variable called URL.myVariable to the target page with a value of 10.

This sort of thing is covered in the first few chapters of any ColdFusion book and is extremely fundamental to using ColdFusion. If you're having questions on topics like this I would *strongly* urge you to buy a book and go through the examples.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian.
How to Post a Question in the Forums

Reply With Quote
  #4  
Old June 25th, 2004, 04:03 PM
Sun2000 Sun2000 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 3 Sun2000 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks alot.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > Passing Information in Query


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway