sql escape json content

This commit is contained in:
Omar Irbouh 2014-07-20 16:39:16 +00:00
parent 117507a951
commit 0a7bcb4e68
1 changed files with 13 additions and 4 deletions

View File

@ -320,6 +320,14 @@
unset($database->sql);
unset($database->result);
$db2->sql = "SELECT currency FROM v_billings WHERE type_value='".check_str(urldecode($xml->variables->accountcode))."'";
$db2->result = $database->execute();
$billing_currency = (strlen($database->result[0]['currency'])?$database->result[0]['currency']:'USD');
if ($debug) {
echo "bc $billing_currency\n";
}
$sql_balance = "SELECT balance, old_balance FROM v_billings WHERE type_value='".check_str(urldecode($xml->variables->accountcode))."'";
$db2->sql = $sql_balance;
$db2->result = $db2->execute();
@ -352,6 +360,7 @@
$db2->result = $db2->execute();
unset($db2->sql);
unset($db2->result);
}
//insert xml_cdr into the db