<dtml-comment>
title:
connection_id:erp5_sql_connection
max_rows:1000
max_cache:100
cache_time:0
class_name:
class_file:
</dtml-comment>
<params>uid
getAcquiredCategoryList
getCategoryList
isMovement</params>
<dtml-if isMovement>
<dtml-if getCategoryList>
<dtml-let uid_list="portal_categories.getCategoryParentUidList(getCategoryList)">
<dtml-if uid_list>
INSERT INTO category VALUES 
<dtml-in "uid_list">
(<dtml-sqlvar uid type="int">, <dtml-var "_['sequence-item'][0]" >, <dtml-var "_['sequence-item'][1]" >, <dtml-var "_['sequence-item'][2]" >)
<dtml-if 
sequence-end><dtml-else>,</dtml-if>
</dtml-in> 
;
<dtml-else>
INSERT INTO category VALUES  (<dtml-sqlvar uid type="int">, NULL, NULL,1);
</dtml-if>
</dtml-let>
<dtml-else>
INSERT INTO category VALUES  (<dtml-sqlvar uid type="int">, NULL, NULL,1);
</dtml-if>
<dtml-else>
<dtml-if getAcquiredCategoryList>
<dtml-let uid_list="portal_categories.getCategoryParentUidList(getAcquiredCategoryList)">
<dtml-if uid_list>
INSERT INTO category VALUES 
<dtml-in "uid_list">
(<dtml-sqlvar uid type="int">, <dtml-var "_['sequence-item'][0]" >, <dtml-var "_['sequence-item'][1]" >, <dtml-var "_['sequence-item'][2]" >)
<dtml-if 
sequence-end><dtml-else>,</dtml-if>
</dtml-in> 
;
<dtml-else>
INSERT INTO category VALUES  (<dtml-sqlvar uid type="int">, NULL, NULL,1);
</dtml-if>
</dtml-let>
<dtml-else>
INSERT INTO category VALUES  (<dtml-sqlvar uid type="int">, NULL, NULL,1);
</dtml-if>
</dtml-if>