On Mon 27 Dec 04,  5:22 PM, S Kumar <[EMAIL PROTECTED]> said:
> Dear group, 
>  I am a novice programmer started doing php to process
> a query form of my patients.  
> I have a database and one table in it deals with my
> patient information.  Depending on their condition I
> divided their age groups into 3 categories. In my
> database a table patient_data has a column age_group
> and a patient can be any one of young, middle or old
> category.   
> Now the possibility is that a user can selecct 1 or 2
> or all three options.
> In the query form, I gave the option for a user as a
> check box. The piece of html code is as below:
> <DIV>Age group</DIV>
> <DIV>Young<input type="checkbox" name=""
> value=""></DIV>
> <DIV>Middle<input type="checkbox" name=""
> value=""></DIV>
> <DIV>Old<input type="checkbox" name="" value=""></DIV>
> Problem:
> I want to capture the user options and create an SQL
> statement:
> 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. 

It seems as though the SQL itself is pretty straight forward.  The where
clause would be generated from a conditional based on what values are true.

Exactly what are you having difficulty with?


PS- How can a single patient be "young", "middle", and "old" at the same time?  
Are you
   a psychologist?

The mathematics of physics has become ever more abstract, rather than more
complicated.  The mind of God appears to be abstract but not complicated.
He also appears to like group theory.  --  Tony Zee's "Fearful Symmetry"

GPG Fingerprint: B9F1 6CF3 47C4 7CD8 D33E  70A9 A3B9 1945 67EA 951D

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to