I build a string,containing mongodb queries using PHP. How can i execute that Query.For example, lets consider my string as
$x = array(
'tag_id'=>'$value',
'content_id'=>'$content_id',
'createdby'=>'test',
'created_date'=>date('d-m-Y'))
Now this is the query which i want to execute. If i give this string like this mongocollection->insert($x)
, Its saying , mongodb exception, with no documents given
. So how can i convert this string into executable statement