選擇所有行(取消WHERE子句)的最佳值是什麼?MYSQL如何取消或無效WHERE子句中的WHERE子句
<select id="ddlSelect">
<option value = ???? > -- SELECT ALL -- </option>
<option value = "1" > 1 </option>
<option value = "2" > 2 </option>
</select>
Select查詢
"SELECT EMPLOYEE_NAME WHERE EMPLOYEE_DEPARTMENT_ID = " + ddlSelect.Value;
對於-- SELECT ALL --
我試過1 OR 1 =1
。它工作正常,但沒有更好的方法?
查看我的答案貼http://stackoverflow.com/questions/19563543/mysql-how-to-cancle-or-void-where-clause-within-where-clause/19563640#19563640 –