我在名为team
的数据库中有两个表team_position_locale
和baltika
出于翻译原因,我试图加入表格,并且不断抛出我Unknown table 'team' in field list
这是我的查询
app.post('/getTeam', (req,res) => {
const join = "SELECT team.first_name AS firstName, " +
"team.last_name AS lastName, " +
"team.picture AS picture, " +
"locale.title AS title "
"FROM baltika.team AS team " +
"JOIN baltika.team_position_locale AS locale " +
"ON team.position_id = locale.object_id " +
"WHERE locale.locale = ?"
connection.query(join, [req.body.locale], function(err, result) {
if(err) throw err;
console.log(result)
res.send(result);
})
});
我是查询的新手,所以它肯定在其中……我只是不知道在哪里。任何帮助将不胜感激!