mongodb - is try/catch in php always working fine? -
i seek handle exception , write code follows exception when document save sucessfully in databse.
$table = "myrequesttable"; $smsid = new mongoid(); $data = array("_id" => $smsid, "requestuserid" => 2500, "requestdate" => new mongodate(strtotime(date('y-m-d h:i:s'))), "requestnossms" => 1 ); seek { $result = $table->insert($data, array("safe" => true)); echo $smsid ; } grab (exception $e) { echo $e->getmessage(); }
i got next exception "invalid modifier specified: $push"
even if insert
command executed right may situation when other instruction throws exception. sure other parts of code correct?
php mongodb
No comments:
Post a Comment