CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 How to declare the data source correctly ?

Print topic Send  topic

Author Message
ambad
Posted: 01/08/2003, 11:29 PM

Using CCS the first time I run into the following "problem":

I have 2 tables:
1) QUESTIONS (question_id, question_text)
2) ANSWERS (answer_id, question_id, answer_text)

I now want to have a grid which lists all available questions in the first column and all available answers (questions.id = answers.question_id) as a listbox in the second column.
So I want to pass the the question_id of the question in column 1 as a parameter to the listbox in column 2 so that this only shows the corresponding values.

Any idea ?

Cheers,
Ambad
Nicole
Posted: 01/10/2003, 5:51 AM

Ambad,
Add listbox field to the form, assign it to the question_id field. Then use ListBox Join functionality to list all the available answeres (open field properties->Join tab to access it). To list not all records but filter them by question_id use custom sql as datasource, e.g.:
PHP
select answer_id, answer_text from ANSWERS where question_id = ". $fldquestion_id ."

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.