如何在单个查询中添加多个AND和Where

时间:2016-03-11 10:49:59

标签: javascript mysql

如何在单个查询中添加多个AND和Where

Date2 = newDate.today();

Select Name from tbl Where (" DER ")  AND EntryStatus ='GUEST' AND Date = "+ Date2 +";

2 个答案:

答案 0 :(得分:0)

你的意思是name = ("DER")

Select Name from tbl Where name = "DER"  AND EntryStatus ='GUEST' AND Date =  CURDATE(); 

答案 1 :(得分:0)

从tbl中选择IntName其中name =" DDL2" AND EntryStatus =' GUEST'和日期='" +日期2 +"' ;