在mysql中将数据存储为十进制数据类型

时间:2016-03-16 08:38:27

标签: php string operators

$id = $_POST["id"]; 
$prevread = $_POST["prev"];                 
$presread = $_POST["pres"];

$getPrev = (int)$prevread;
$getPres = (int)$presread;

$totalcons = (int)$_POST[$getPres - $getPrev];

$sql = "UPDATE con_billing SET totalConsumed ='$totalcons' WHERE con_id='$id';

0 个答案:

没有答案