dourun2990
2017-04-06 11:08
采纳率: 100%
浏览 462
已采纳

SQL语法; 检查与MariaDB服务器版本对应的手册[关闭]

I'm getting the following SQL error:

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near `classxii`.`email`='rajdeep@gmail.com', `classx`.`email`='rajdeep@gmail.com' at line 5

My PHP code looks like:

$sql = "UPDATE `graduation`, `classxii`, `classx` SET `university`='$university', `college`='$college', `course`='$course', `branch`='$branch', `year`='$year', 
`school1`='$school1', `board1`='$board1', `percentage1`='$percentage1', `year1`='$year1', 
`school2`='$school2', `board2`='$board2', `percentage2`='$percentage2', `year2`='$year2' 
WHERE `graduation`.`email`='$email', `classxii`.`email`='$email', `classx`.`email`='$email'";

$res = mysql_query($sql) or die(mysql_error());

What could be the issue here?

图片转代码服务由CSDN问答提供 功能建议

我收到以下SQL错误:

您的SQL语法有错误; 检查与您的MariaDB服务器版本相对应的手册 ,以便在 `classxii``email`='rajdeep@gmail.com',`classx``email` ='rajdeep附近使用正确的语法 @ gmail.com'第5行

我的PHP代码如下所示:

  $  sql =“UPDATE`毕业`,`classxii`,`classx` SET`university` ='$ university',`college` ='$ college',`course` ='$ course',`branch` ='$ branch  ',`year` ='$ year',
`school1` ='$ school1',`board1` ='$ board1',`percentage1` ='$ percentage1',`year1` ='$ year1',\  n`school2` ='$ school2',`board2` ='$ board2',`percentage2` ='$ percentage2',`year2` ='$ year2'
WHERE`debond``email` ='$ email'  ,`classxii` .email` ='$ email',`classx``email` ='$ email'“; 
 
 $ res = mysql_query($ sql)or die(mysql_error()); 
    
 
 

这里可能出现什么问题?

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

1条回答 默认 最新

相关推荐 更多相似问题