GetADODBConnection(); $replacements = Array( '{ProductCatId}' => $application->findModule('Name', 'In-Commerce', 'RootCat'), '{User_GuestGroup}' => $application->ConfigValue('User_GuestGroup'), '{User_NewGroup}' => $application->ConfigValue('User_NewGroup'), '{User_SubscriberGroup}' => $application->ConfigValue('User_SubscriberGroup'), ); $i = 0; $count = count($sql); while ($i < $count) { foreach ($replacements as $replace_from => $replace_to) { $sql[$i] = str_replace($replace_from, $replace_to, $sql[$i]); } $i++; } RunSQLText($application->Conn, $sql, 'dbconnection'); ?>