conditional menu items

SF Guy
  • SF Guy
    SF Guy

    i have a Menu Admin in which a user can specify whether he wants to display a particular category in the right-hand side menu or left-hand side menu.

    The field used in the table for this purpose is "cat_position" and holds either the value "1"(right) or "2"(left)

    now when i want to display the menu items for right menu i simply use the following SQL:

    select * from categories where cat_position = 1 order by cat_order ASC

    I want to know how can i implement the same functionality using PHP Layers.

    Any help will be highly appreciated.