Hello Pete:
It is a cancer patients for whom i have data on
preoperative and postoperative procedures and drugs
administered for that condition. my table looks like
this:
S. No Pat_age_group type_of cancer size_of_tumor
1 Old Prostate 5 cm
2 Young breast 3 cm
So, in the case of my table, there is not discrepancy
in age group assignment.
The search page contains a mix of textboxes and
checkboxes.
So, my aim is to allow the user to search
intelligently.
For example: Say there 6 textboxes and 6 checkboxes.
The search terms that can be entered in 1 and 2 boxes
are to be searched in TABLE-A column a_b and a_c. The
search terms that can be entered in 3,4,5 and 6
textboxes are to be searched in TABLE-B columns
b_c,b_d,b_e and b_f.
Now, I have given options to the user in the form of
checkboxes. For example:
Smoking status: Smoker and non-smoker
age group : young, old and middle
And all these options that he checks here are to be
searhed in another table TABLE-C.
Depending on what the user enters the data, I want to
create an SQL statement on the fly and report the
results.
If the user, does not enter text in textboxes 1 and 2
and enters some search term in textbox 3. I want to
capture that term as a variable and create an SQL
statement to search the mother table say TABLE-A.
So I set out to capture all the search terms that the
user enters in the search form as variables. I want to
define some properties to the variables saying if
variable $cancer (Coming from textbox 1) is not null,
then this variable can only be searched in TABLE-A ,
column a_b.
If the user enteres something in textbox 2, then
$tissue (coming from textbox 2) should be searched in
TABLE A, column a_c.
However, in the case of checkboxes, I do not know how
to make variables out of them depensing on what user
selects. Say whatever user cheks in the checkbox,
that variable has to be searched in TABLE-C and
various other columns in that table. I am totally
clueless how I can capture what user checks as a
variable and incorporate into the SQL statement.
I apologise for the lengthy description, being a
person trained on the areas of medicine and biology, I
am unable to communicate what a programmer or a CS
student would do so in order to ask precisely.
So please help me suggesting a easiest way to deal
with a scenario where I can create SQL statements on
the fly easily depending on what user enters in the
search form.
Just for your convenience what exactly I have instead
of imaginary tables that described for exmpleray
purpose.
I appreciate you help a lot and sorry again for
lenghty e-mail that you might have to go through. BTW
I am a mdedical scientist from Baltimore.
Thanks.
K
*****************************************************
I have a serch page that has both text boxes and check
boxes. The attributes and their tables are written in
the praranthesis. TB - Text box The type of form
element i.e text box or check box is represented in
curly braces.
Cancer {TB} (Table - Experiment; column - experiment
name)
TISSUE {TB} (Table - Sample; Column - Sample name)
Gene Name {TB} (Table - Sequence_annotation ; Column -
fc_gene_symbol)
MOLECULAR FUNCTION {TB} ( Table - Sequence_annotation;
column - fc_molecular_function)
CELLULAR COMPONENT {TB} (Table - sequence_annotation;
column - fc_cellular_component)
BIOLOGICAL PROCESS {TB} (Table - sequence_annotation;
column - fc_biological_process)
AGE GROUP {CHECK BOX}
option 1 : Young (Tabe - patient_data ; column -
patient_age_group)
option 2: Middle (Tabe - patient_data ; column -
patient_age_group)
option 3: Old (Tabe - patient_data ; column -
patient_age_group)
SMOKING {CHECK BOX}
option 1 : No (Tabe - patient_data ; column -
patient_smoking)
option 2 : Yes (Tabe - patient_data ; column -
patient_smoking)
ER {CHECK BOX}
option 1: Positive (Tabe - patient_data ; column -
patient_ER)
option 2: Negative (Tabe - patient_data ; column -
patient_ER)
PR {CHECK BOX}
option 1: Positive (Tabe - patient_data ; column -
patient_PR)
option 2: Negative (Tabe - patient_data ; column -
patient_PR)
RECURRENT STATUS {CHECK BOX}
option 1: < 5 Months (Tabe - patient_data ; column -
patient_recurrent_Status)
option 1: 5-10 moths (Tabe - patient_data ; column -
patient_recurrent_Status)
option 1: > 10 Months (Tabe - patient_data ; column -
patient_recurrent_Status)
METASTATSIS STAGE {CHECK BOX}
Option 1: Yes (Tabe - patient_data ; column -
patient_metastasis_stage)
Option 2: No (Tabe - patient_data ; column -
patient_metastasis_stage)
--- Peter Jay Salzman <[EMAIL PROTECTED]> wrote:
> On Mon 27 Dec 04, 9:22 PM, p <p> said:
> > >
> > > Select age_group from patient_data where
> age_group =
> > > young and old ;
> > >
> > >
> > > I am truly stuck here. Can any one please help
> me out
> > > to pass this situation.
> > >
> > > Thank you in advance.
> > >
> > > Kumar.
> >
> > PS- How can a single patient be "young", "middle",
> and "old" at the same
> > time? Are you a psychologist?
>
> Sorry. There should have been a smiley ":-)" after
> that sentence.
>
> Pete
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
__________________________________
Do you Yahoo!?
The all-new My Yahoo! - Get yours free!
http://my.yahoo.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php