Help for this page

Select Code to Download


  1. or download this
    SET @sort = 0;
    
    ...
    SET f_sort = (@sort := @sort +1)
    WHERE T.f_parent_id = 2
    ORDER BY f_sort;
    
  2. or download this
    f_node_id    is the primary key
    f_parent_id  is the node_id of an upper structure
    f_name       is the key of a hash if f_sort= NULL, 
                 otherwise it's just an optional "name" of a array element
    +*
    f_sort       is the array index and NULL for hashes