1. Hugh is (technically) on vacation for the rest of September, travelling to Europe for his son's wedding in England, and to meet up with Rob in La Rochelle, France. He will be checking the forums most days, and providing some support, but his time will be limited, and he will be unable to do any custom coding work. Apologies in advance for any inconvenience.

Problem with filters containing SQL OR statement

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

  1. andrea.dori

    andrea.dori New Member

    Level: Community
    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