-
query returning no results?
I cant figure out what is wrong whith this query (does it have to do with prioritya or priorityc
select *, DATE_FORMAT(a_date, '%m/%d/%Y') as a_date_formatted from company, activity where c_id=a_c_id and medivas ='$poc' and priority ='$prioritya' and priority ='$priorityc'
any ideas???
-
what did you want to say when you put this part?
priority ='$prioritya' and priority ='$priorityc'
I guess you wanted this: priority in( '$prioritya','$priorityc')
-
Happy 4th!
Wll, what I want to happen is the query would return results where priority is equal to both variables; $prioritya and $priorityc...
is this right?
...priority in( '$prioritya','$priorityc')
-
yes it is...
or you can use:
and (priority ='$prioritya' or or priority='$priorityc')..
Make sure you put the parethesis..
"p1 and (q1 or q2)" & " p1 and q1 or q2" are different
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|