1. We apologize for the slow support at the moment. Hugh (cheesegrits) is scheduled for some major back surgery this month to repair two ruptured discs which are severely hampering his ability to work, and one of our stalwart community support members is on vacation for the month. Please bear with us.

Problem with filters containing SQL OR statement

Discussion in 'Subscriber Support' started by andrea.dori, Feb 9, 2010.

  1. andrea.dori New Member

    Level: Community
    Hello,
    my problem is on an installation of Fabrik 1.06 on a Joomla 1.015 stable. I have a table on wich I define pre-filters based on the 'position' field. Defining only one filter (say EQUALS 'teacher') works fine AND clicking on the link for the detailed view brings to the correct record, BUT defining more filters with joined by 'OR' works fine for the table view but clicking on the link for detailed view display the first record of the filtered table.
    IMHO this happens because the resulting SQL for the detailed view is in the form SQL SELECT items WHERE tablefilter OR tablefilter OR tablefilter AND rowId=correctId missing parenthesis containing the OR statements. This way if the first OR statement is true (and this is the case for the first record on my table view) the rowID statement at the end of the WHERE statement is ignored. I think...
    I hope my explanation in my poor english is clear.
    Thanks in advance

    UPDATE: seems trickable redirecting the detailed URL to a form connected to a table without the pre-filters.

Share This Page