这个,它确实删除金额少于1的地方 但它没有更新用户,为什么不呢?谁能告诉我?
$data1 = mysqlI_query($link,"SELECT * FROM bubble_spends where burst <= 0");
$data = mysqli_fetch_array($data1);
$burst123='$data[burst]';
$username123='$data[username]';
IF($data1)
{
mysqli_query($link,"UPDATE * FROM 'users' SET 'bitcoins'='bitcoins'-'$burst123' WHERE 'username' = '$username123' ");
mysqli_query($link,"DELETE FROM bubble_spends where amount <= 1");
}
Greets Patrick
答案 0 :(得分:0)
更新users
设置bitcoins
= bitcoins
- $ burst123 WHERE username
='$ username123'
更新了查询:
$data1 = mysqli_query($link,"SELECT * FROM bubble_spends where burst <= 0");
$data = mysqli_fetch_array($data1);
$burst123='$data[burst]';
$username123='$data[username]';
IF($data1)
{
mysqli_query($link,"UPDATE `users` SET `bitcoins`=`bitcoins`- $burst123 WHERE `username` = '$username123' ");
mysqli_query($link,"DELETE FROM bubble_spends where amount <= 1");
}