SET t_points=t_points+ (SELECT points from sites where url='$url') where username='$login_session'";如果子查询SELECT points from sites where url='$url'返回一些东西,那么查询就可以正常工作。如果不返回任何内容,则t_points中的前一个值将变为null。
如何编写更具
在我的python代码中,我希望根据用户输入更新表值,因此我需要在查询中传递动态值,但我无法获得任何结果。你能给我推荐一条路吗?下面是我的代码:`
conn=mysql.connector.connectmycursor.execute("UPDATE interest_rate SET interest=(rate,
可能重复:
mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home("UPDATE news SET titel='" . mysql_real_escape_string($_POST['titel']) . "', inhoud='" . mysql_real_escape_stringg