Пример #1
0
function db_delete($gc) {

	$gc->db->begin_tran();

	$sql = "DELETE FROM";
	$sql.= " m_company_user ";
	$sql.= "WHERE";
	$sql.= " user_no = ".$gc->user_no;

	$ret = $gc->db->execute($sql, true);

	if($ret["errno"] > 0){
		$gc->db->rollback();
		if(db_set_delete_errmsg($gc, $ret["errno"], $ret["error"])){
			return false;
		}else{
			die('delete error');
		}
	}

	$gc->db->commit();

	return true;

}
Пример #2
0
function db_delete($gc) {

	$gc->db->begin_tran();

	$sql = "DELETE FROM";
	$sql.= " propertylist ";
	$sql.= "WHERE";
	$sql.= " property_no = ".f_num_edit_db($gc->property_no);

	$ret = $gc->db->execute($sql, true);

	if($ret["errno"] > 0){
		$gc->db->rollback();
		if(db_set_delete_errmsg($gc, $ret["errno"], $ret["error"])){
			return false;
		}else{
			die('delete error');
		}
	}

	//詳細削除
	$sql = "DELETE FROM";
	$sql.= " propertydetail ";
	$sql.= "WHERE";
	$sql.= " property_no = ".f_num_edit_db($gc->property_no);

	$ret = $gc->db->execute($sql, true);

	if($ret["errno"] > 0){
		$gc->db->rollback();
		if(db_set_delete_errmsg($gc, $ret["errno"], $ret["error"])){
			return false;
		}else{
			die('delete error');
		}
	}

	$gc->db->commit();

	return true;

}