We help IT Professionals succeed at work.
Get Started

Curious how Expert Awards are earned? Find out on this week's podcast, featuring Experts Exchange CEO Randy Redberg.Listen Now

x
Troubleshooting Question

Adding a line breaks the query

David Schure
David Schure asked
on
66 Views
Last Modified: 2020-11-26
If I run this query it returns an answer
SELECT tbl_answers_therapist.therapist_id,therapist_name, photo,details
   FROM tbl_answers_therapist
   JOIN tbl_answers
   JOIN tbl_therapist_type
   WHERE tbl_answers.client_id = 456
   AND tbl_answers_therapist.status = 'Yes'
   AND tbl_answers.type_id = tbl_therapist_type.type_id
   AND tbl_answers.practice_id = tbl_therapist_type.practice_id
   AND tbl_therapist_type.therapist_id = tbl_answers_therapist.therapist_id
   Limit 3   
if I add this line (in bold) it breaks..
SELECT tbl_answers_therapist.therapist_id,therapist_name, photo,details
   FROM tbl_answers_therapist
   JOIN tbl_answers
   JOIN tbl_therapist_type
   WHERE tbl_answers.client_id = 456
   AND tbl_answers_therapist.status = 'Yes'
   AND tbl_answers.state = tbl_answers_therapist.state
   AND tbl_answers.type_id = tbl_therapist_type.type_id
   AND tbl_answers.practice_id = tbl_therapist_type.practice_id
   AND tbl_therapist_type.therapist_id = tbl_answers_therapist.therapist_id
   Limit 3   

Comment
Watch Question
CERTIFIED EXPERT
Most Valuable Expert 2020
Most Valuable Expert 2018
Commented:
This problem has been solved!
Unlock 1 Answer and 34 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant

An Experts Exchange subscription includes unlimited access to online courses.

Get Started
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE