mysql语句错误

SELECT 
    user.user_id, 
    user.nickename, 
    user.truename, 
    user.sex, 
    user.headimg, 
    user.bank, 
    user.banktype, 
    user.phonenumber, 
    user.password, 
    user.credit_line, 
    user.while_line, 
    user.rating, 
    user.token, 
    profile.id AS profile__id, 
    profile.user_id AS profile__user_id, 
    profile.contact AS profile__contact, 
    profile.come AS profile__come, 
    profile.marriage AS profile__marriage, 
    profile.job AS profile__job, 
    profile.edu AS profile__edu, 
    profile.adress AS profile__adress 
FROM 
    user user 
    INNER JOIN profile profile ON user.user_id = profile.user_id 
WHERE 
    user.user_id = 1 
LIMIT 
    1
    

clipboard.png

哪里出错了,字段名是没写错的。但是一直报错...

好像有

clipboard.png
这两个字段就会报错 这是什么原因?

阅读 1.8k
2 个回答

虽然不知道什么情况,但是把这两个字段删了就好了

在catch块里把PDOException打出来看看

    echo $e->getMessage()." \n ".$e->getTraceAsString();
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题