|
想建一个查询,在一个表里面,同时满足chk_595=true和chk_593=true,用怎么写啊?
单独满足一个条件chk_595=true的语句是这样的:
SELECT tbl_answers.fld_value, tbl_initiative.fld_initiativename, tbl_initiative.fld_posted, tbl_questions.fld_pageid, tbl_questions.fld_quesorder, tbl_questions.fld_ctrlid, tbl_questions.fld_ctrlid
FROM tbl_users INNER JOIN (tbl_initiative INNER JOIN (tbl_questions INNER JOIN tbl_answers ON tbl_questions.fld_ctrlid = tbl_answers.fld_ctrlid) ON tbl_initiative.fld_id = tbl_answers.fld_initiativeid) ON tbl_users.fld_id = tbl_answers.fld_userid
WHERE (((tbl_answers.fld_value)="true") AND ((tbl_initiative.fld_posted)="1") AND ((tbl_questions.fld_ctrlid)="chk_595"));
谢谢了。 |
|