Hi,
I have what I believe is a pretty simple question, but I can't seem to figure it out.
I have a column in my mysql db called PopT_Children. If the value in that field is Y, then the doctor treats children. If the value is N, then the doctor does not.
I am querying the database and displaying information about doctors (name, address, treatment population, etc.). So, if the doc's PopT_Children field contains a Y, I would like to display "Treats Children". If the field contains an N, I would like to display "Does Not Treat Children". I must be having a brain freeze because I cannot seem to get it to work. Below is example of what I have been trying with no luck. Any help would be great!
<?
$query = "SELECT * FROM db WHERE ID = '$ID'";
$result = mysql_query($query) or die ("Error in query: $query. " . mysql_error());
$row = mysql_fetch_object($result);
if ($row)
{
?>
<? if( $PopT_Children == Y( $row-> PopT_Children) )
{ echo("Does Not Treat Children"); }else{ echo "Treat Children"; }?>