如何使用 PDO 编写以下请求?
$query = "SELECT test FROM table WHERE cond IN(1,2,3)";
我试过这个,但它不工作:
$query = "SELECT test FROM table WHERE cond IN(?)";
$params = array($condArray);
$result = sqlsrv_query($connConfig, $query, $params) ;
如何使用 PDO 编写以下请求?
$query = "SELECT test FROM table WHERE cond IN(1,2,3)";
我试过这个,但它不工作:
$query = "SELECT test FROM table WHERE cond IN(?)";
$params = array($condArray);
$result = sqlsrv_query($connConfig, $query, $params) ;