Link to home
Start Free TrialLog in
Avatar of Pete Winter
Pete WinterFlag for United Kingdom of Great Britain and Northern Ireland

asked on

sql where issue

See my below code:

WHERE td.call_back_id = ".$row_rs_call_back_request['id']." AND td.hide_comment IS NULL OR td.hide_comment = 'No'";

I must be writing it incorrectly as I am not getting the correct result.

I basically want the code after the AND grouped.

i.e.

td.call_back_id = ".$row_rs_call_back_request['id']."

AND

(td.hide_comment IS NULL OR = 'No')

I have just put bracket to separate and try to explain what I require, but not sure how to write.

How it makes sense. Ask if not?

SOLUTION
Avatar of Limbeck
Limbeck

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Pete Winter

ASKER

So Simple... Many thanks :)