ここでの最初の質問の後、正しくテストされた以下のコードが表示されました。
SELECT DISTINCT
id, title, description, expires,
creator_id,executer_id,
oc_opentask.priority_id,
oc_opentask.status_id, priority_name, status_name,
oc_user1.username AS executer_username,
oc_user2.username AS creator_username
FROM oc_opentask
INNER JOIN oc_opentask_priority
ON oc_opentask.priority_id=oc_opentask_priority.priority_id
INNER JOIN oc_opentask_status
ON oc_opentask.status_id=oc_opentask_status.status_id
INNER JOIN oc_user AS oc_user1
ON oc_opentask.executer_id=oc_user1.user_id
INNER JOIN oc_user AS oc_user2
ON oc_opentask.creator_id=oc_user2.user_id
私の次の質問は次のとおりです。それらにアクセスし、WHERE属性を使用して値と比較したいexecuter_username
のでcreator_username
、私が試しているのは次のとおりです。
SELECT DISTINCT
id, title, description, expires,
creator_id,executer_id,
oc_opentask.priority_id,
oc_opentask.status_id, priority_name, status_name,
oc_user1.username AS executer_username,
oc_user2.username AS creator_username
FROM oc_opentask
INNER JOIN oc_opentask_priority
ON oc_opentask.priority_id=oc_opentask_priority.priority_id
INNER JOIN oc_opentask_status
ON oc_opentask.status_id=oc_opentask_status.status_id
INNER JOIN oc_user AS oc_user1
ON oc_opentask.executer_id=oc_user1.user_id
INNER JOIN oc_user AS oc_user2
ON oc_opentask.creator_id=oc_user2.user_id
WHERE oc_opentask.creator_username='bill'
ビルはdbに存在しますが、その値にアクセスするための私のコマンドは正しくありません、any1はこれで私を助けることができますか?ありがとう