谁能找到SQL语句的问题? [英] Can anyone find problem with SQL statement?
本文介绍了谁能找到SQL语句的问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我最近解决了这个问题-但是我当然失去了工作
我正在对将查询点插入表中的更新查询进行操作
目前,我已经将var_dump的每个可能变量都设置为变量,并且所有变量都正确.
SQL语句也返回为TRUE,但它没有更改数据库中的任何内容
任何人都可以尽快帮助吗?
我尝试过的事情:
Hi, i recently resolved this - but of course i lost my work
I am working on update query which inserts points into table
Currently, i have var_dump every possible variable and all of them are correct.
The SQL statement also coming back as TRUE but it''s not changing anything in database
Can anyone HELP asap?
What I have tried:
while ($dbRow=$dbQuery->fetch(PDO::FETCH_ASSOC)) {
$points = $dbRow[''Points''];
$pointsDeduction =-20;
}
if($daysLeft == $End) {
$stmt = $conn->prepare("UPDATE Profile SET Points = $points - $pointsDeduction WHERE UserID= $UserID WHERE UserID= $UserID");
$dbQuery->execute();
echo" - 20 points will be deducted</h4></center></h4>";
}
推荐答案
dbRow =
dbQuery-&f; fetch(PDO :: FETCH_ASSOC)){
dbQuery->fetch(PDO::FETCH_ASSOC)) {
点=
这篇关于谁能找到SQL语句的问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文