鍍金池/ 問答/PHP  數(shù)據(jù)庫/ mysql語句錯(cuò)誤

mysql語句錯(cuò)誤

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

哪里出錯(cuò)了,字段名是沒寫錯(cuò)的。但是一直報(bào)錯(cuò)...

好像有

clipboard.png
這兩個(gè)字段就會(huì)報(bào)錯(cuò) 這是什么原因?

回答
編輯回答
嫑吢丕

在catch塊里把PDOException打出來看看

    echo $e->getMessage()." \n ".$e->getTraceAsString();
2018年4月13日 04:59
編輯回答
空白格

雖然不知道什么情況,但是把這兩個(gè)字段刪了就好了

2018年2月6日 15:09