I am saving "Article" in MongoDB as bellow with _id of integers. When I want to delete the article with the _id in php, nothing happens. The code I use is:
$result = $db->arcitle->remove(
array("_id" =>intVal(41)),
array('safe' => true)
);
I have tried both with and without using "safe" option, neither works. When I echo $result, it is bool(true).
Any suggestion is much appreciated!
{ "_id" : 41,
"when" : Date( 1333318420855 ),
"publisher" : "5",
"title" : "10 Steps To The Perfect Portfolio Website",
"raw" : "",
"preview" : "",
"thumbnail" : "",
"content" : [
"{}" ],
"tags" : null,
"votes" : 0,
"voters" : [],
"comments" : [] }