vtenext/modules/Update/changes/1802_1803.php
2021-04-28 20:10:26 +02:00

10 lines
539 B
PHP

<?php
global $adb, $table_prefix;
$uitype = 54;
$result = $adb->pquery("select fieldtypeid from {$table_prefix}_ws_fieldtype where uitype=?", array($uitype));
if ($result && $adb->num_rows($result) == 0) {
$fieldtypeid = $adb->getUniqueID($table_prefix."_ws_fieldtype");
$adb->pquery("insert into {$table_prefix}_ws_fieldtype(fieldtypeid,uitype,fieldtype) values(?,?,?)",array($fieldtypeid,$uitype,'reference'));
$adb->pquery("insert into {$table_prefix}_ws_referencetype(fieldtypeid,type) values(?,?)",array($fieldtypeid,'Groups'));
}