如何在 cfscript 中构造 IN 子句?这是我所拥有的:
var tagList = "301,302,303,304";
var q = new Query ();
q.setDatasource ("mydatasource");
var sqlStmt = "SELECT * FROM Tags WHERE tagID IN (:tagList)";
// I know the next line is not correct!
q.addParam (name="tagList", value="#tagList#", cfsqltype="??? WHAT SHOULD IT BE ???");
有没有一种简单的方法可以做到这一点,还是我需要遍历标签列表,分别添加每个标签?