title: Facing issue in mysql query
body: <p>I am facing issue while joining the three table Employee,Eventcelibration,emp_event.</p>
  
  <p>Employee table has three fields birth_date,date_of_joining,Anniversary_date.</p>
  
  <p>want to make a query on basis of above three column.if employee has birthday then select the birth_day description from other table eventcelibration and if he has joining date today then select joining message from the table. like wise.</p>
  
  <p>made the query on some dummy data as below.</p>
  
  <p><strong>Employee table</strong></p>
  
  <pre><code>id
  employee_id
  name
  designation
  contactno
  email
  birth_date
  date_of_joining
  </code></pre>
  
  <p><strong>Table eventcelibration</strong></p>
  
  <pre><code>Event_cl_id
  Event_type
  frequency
  description
  template
  subject
  </code></pre>
  
  <p>Third Table </p>
  
  <p><strong>Emp_event</strong></p>
  
  <pre><code>Event_id
  employee_id.
  </code></pre>
  
  <p>I have tried the query,</p>
  
  <pre><code>select a.employee_id,a.name,a.email,a.birth_date,c.template,c.description,c.subject,c.event_type from 
  employee a  inner join emp_event b   on a.id = b.Event_id
  inner join eventcelebration c  on b.employee_id = c.event_cl_id
  where CAST(birth_date as date) = CAST(curdate() as date) or CAST(date_of_joining as date) = CAST(curdate() as date) 
  </code></pre>
  
  <p>It returns us the three result but I want only one that is birthday , because birthday is today date.</p>