我只想知道将变量中的值插入数据库中的表的正确方法是什么。我做错了吗?
**$mysqli->query("INSERT INTO `trade_history1` (user_id, trade_id, selection, date, type, size, bidprice, offerprice, stoploss, takeprofit,dateclose,close,profitandloss)
SELECT user_id, trade_id, selection, date, type, size, bidprice, offerprice, stoploss, takeprofit, 'null','null','null'**
FROM `opentrades`
WHERE `trade_id` = " . $trade_id);
$mysqli-> query("UPDATE trade_history1 set dateclose=CURRENT_TIMESTAMP WHERE `trade_id` = " . $trade_id);
**$mysqli-> query("UPDATE trade_history1 set close='{$closedb}' WHERE `trade_id` = " . $trade_id);**
**$mysqli-> query("UPDATE trade_history1 set profitandloss='{$profitandloss}' WHERE `trade_id` = " . $trade_id);**
$mysqli->query("DELETE FROM `opentrades` WHERE `trade_id` = " . $trade_id);