Results 1 to 4 of 4

Thread: query returning no results?

  1. #1
    Join Date
    Jun 2005
    Location
    coronado
    Posts
    76

    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???

  2. #2
    Join Date
    Apr 2005
    Location
    florida
    Posts
    89
    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')

  3. #3
    Join Date
    Jun 2005
    Location
    coronado
    Posts
    76
    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')

  4. #4
    Join Date
    Apr 2005
    Location
    florida
    Posts
    89
    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
  •