<?php
$sql_prefix = 'UPDATE ' . $config['table_prefix'] . 'calc_template SET ';
$sql_query1 = <<<'EOT'
`calculate_tpl` = '$string = \'{$flex_data}\';\nif ($string) {\n    {literal}$string = str_replace(\'{f\', \'$line[\\\'f\', $string);\n    $string = str_replace(\'}\', \'\\\']\', $string);{/literal}\n    $string = \'$line[\\\'{$result}\\\'] = \' . $string . \';\';\n    eval($string);\n}'
WHERE `id` IN (75, 21)
EOT;
run_query($sql_prefix . $sql_query1);