查询 MySQL 数据库时收到错误消息:
'where 子句'中的未知列'velvet'
"SELECT ATCOCode,Latitude,Longitude FROM StopCode
INNER JOIN JourneyStopCode ON StopCode.ATCOCode = JourneyStopCode.StopCode
INNER JOIN Journey On Journey.Code = JourneyStopCode.JourneyCode
WHERE JourneyCode = code
AND Journey.Operator = velvet"
我的 SQL 有什么问题吗?下面是我的表结构。
--------------- --------------------- ----------------
| Journey | | JourneyStopCode | | StopCode |
--------------- --------------------- ----------------
| Code | | JourneyStopCodeID | | StopCode |
| Operator | | JourneyCode | | Latitude |
| Description | | StopCode | | Longitude |
--------------- --------------------- ----------------