私はこれを行うのに苦労しています。基本的に、1つのフィールドが何かと等しく、別のフィールドが何かと等しくないデータベースのdeleteAllを実行したい..重複する行を削除するため、1行を除くすべてを削除したい..以下で試した方法は機能しません。アドバイスをいただければ幸いです。
$conditions = array (
"Prox.proxy" => $currentproxytocheck,
"AND" => array (
"NOT" => array (
"Prox.proxyid" => $currentproxyid
)
)
);
$this->Prox->deleteAll(array( 'conditions' => $conditions));
編集:
私の $conditions 配列の出力は次のとおりです。
Array
(
[Prox.proxy] => 62.58.179.2:80
[AND] => Array
(
[NOT] => Array
(
[Prox.proxyid] => 36829
)
)
)
CAkephp からのエラー:
Notice (8): Array to string conversion [CORE/cake/libs/model/datasources/dbo_source.php, line 2193]
Warning (512): SQL Error: 1054: Unknown column 'conditions' in 'where clause' [CORE/cake/libs/model/datasources/dbo_source.php, line 673]