当它匹配以下两个条件时,我需要更新数据库中的字段是我的代码
,这是对于WHERE
条件中的一个值可以正常工作的查询
query2 = "UPDATE Game_mygame
SET game_played = "+str(set_game_played)+"
WHERE home_teamID = "+str(i.home_teamID)
但我需要匹配两个值WHERE
,我正在尝试以下
query2 = "UPDATE Game_mygame
SET game_played = "+str(set_game_played)+"
WHERE home_teamID = "+str(i.home_teamID)+
"AND away_teamID = "+str(i.away_teamID)
但是这个给出了语法错误
请建议我在哪里做错了