2 Replies Latest reply on Feb 26, 2008 11:22 PM by (Laurence_Lewis)

    AND in SQL to Filter record

    (Laurence_Lewis) Level 1
      Hi,

      I am trying to filter a recordset so it shows only the entried from one state.

      The SQL is:

      $query_rsaddEvents1 = "SELECT addEvents.Division, addEvents.eventDate, addEvents.eventName, addEvents.contactName, addEvents.id_addevent FROM addEvents WHERE {$NXTFilter_rsaddEvents1} ORDER BY {$NXTSort_rsaddEvents1}";

      I tried:

      $query_rsaddEvents1 = "SELECT addEvents.Division, addEvents.eventDate, addEvents.eventName, addEvents.contactName, addEvents.id_addevent FROM addEvents WHERE {$NXTFilter_rsaddEvents1}AND addEvents.Division='NSW' ORDER BY {$NXTSort_rsaddEvents1}";

      But it does nnot filter the results. Where should I insert the AND statement?

      thanks

      Laurence