0

だからここにあります:

....AND (c.user_id NOT IN ('2,1'))だから私は引用符を削除したいNOT IN (2,1)

->where("c.user_id NOT IN (?)",$not_in)

このような出力を取得する方法はありますか?NOT IN (2,1)

4

2 に答える 2

0

このように解決されました:

->where("c.user_id NOT IN (?)",new Zend_Db_Expr($exclude))
于 2013-04-26T02:08:59.017 に答える
0

文字列ではなく配列を渡す必要があります

->where("c.user_id NOT IN (?)", $not_in_array)

文字列しかない場合-explode()それ:

$not_in_array = explode(',', $not_in);
于 2013-04-26T01:54:11.007 に答える