多个AND条件MySQL

时间:2012-07-18 16:18:13

标签: php mysql

如何在子句中包含多个AND条件?就像SELECT * FROM database WHERE x=x,y=y AND z=z我试过的那样,它没有用。感谢。

2 个答案:

答案 0 :(得分:13)

SELECT * FROM table WHERE x=x AND y=y AND z=z

答案 1 :(得分:7)

SELECT * FROM database WHERE `x`=x AND `y`=y AND `z`=z