- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
public function delete_post($id_op){
$ret = 'false';
if((!empty($id_op))){
try{
$ret1 = $this->getAdapter()->delete($this->users_posts_table, 'op_id = '.intval($id_op));
$ret2 = $this->getAdapter()->delete($this->offer_posts_table, 'id_op = '.intval($id_op));
if($ret1>0 && $ret2>0){
$ret = 'true';
}
}catch(Exception $e){
$this->logger->log('module: deleting in users_posts, offer_posts tables '.$e->getMessage(), Zend_Log::ERR);
}
}
else{
$ret = 'false';
$this->logger->log('function: delete_post : id_op is null', Zend_Log::ERR);
}
return $ret;
}
Код тим лидера.
форматирование автора