What is the post_id of a given postupdate?

@param  int    $id     The ID of a postupdate
@return mixed
354170
public function postIdOfPostupdate($id)
    {
        // $record is a stdClass
        $record = DB::table('postupdates')
            ->select('post_id')
            ->where('id', '=', $id)
            ->first()
        ;

        return $record->post_id;
    }
523478
public function actionIndexPost($id=NULL)
	{
		if ($id === NULL)
			return $this->createComment();
		else
			return $this->updateComment($id);
	}
1346332
public static function getPostForIndexListing($id) {

        // Actually, it's dangerous and confusing to have the link to the post's EDIT
        // form display in the post update's create/edit form. So, I am omitting
        // the link; and, instead, am displaying the post's title with the post's
        // ID in brackets.

        /*
        $post = DB::table('posts')->where('id', $id)->first();
        $html  = '<a href="';
        $html .= URL::route('admin.posts.edit', $id);
        $html .= '" target="_blank">'.$post->title.'</a>';
        */

        $title = DB::table('posts')->where('id', '=', $id)->pluck('title');
        $html = $title." (".$id.")";

        return $html;
    }
1123333
protected function check_post_id( $pid ) {
		if ( is_numeric($pid) && $pid === 0 ) {
			$pid = get_the_ID();
			return $pid;
		}
		if ( !is_numeric($pid) && is_string($pid) ) {
			$pid = PostGetter::get_post_id_by_name($pid);
			return $pid;
		}
		if ( !$pid ) {
			return null;
		}
		return $pid;
	}
1230249
public static function findPostsCount($id)
    {
        $cache = Podium::getInstance()->podiumCache->getElement('user.postscount', $id);
        if ($cache === false) {
            $cache = (new Query)->from(Post::tableName())->where(['author_id' => $id])->count();
            Podium::getInstance()->podiumCache->setElement('user.postscount', $id, $cache);
        }
        return $cache;
    }
421488
public function deletePost( $id ) {

        $userAttributes = $this->service->getUserAttributes();

        $response = $this->service->api( 'wall.delete', 'GET', [
            'owner_id' => $userAttributes['id'],
            'post_id'  => $id
        ] );

        return $response['response'] == 1;
    }
621333
public function actionUpdate($id)
    {
        $this->layout = static::MAIN_LAYOUT;
        $model = $this->findModel($id);

        if ($model->load(Yii::$app->request->post()) && $model->save()) {
            $this->afterUpdate($model);
            return $this->redirect(['view', 'id' => $model->id]);
        } else {
            if($model->template) {
                return $this->render($model->template, [
                    'model' => $model,
                ]);
            } else {
                return $this->render('update', [
                    'model' => $model,
                ]);
            }
        }
    }
604313
public function getPostEditPost($id)
    {
        $form = new EditPostForm($this->di, $id);
        $form->check();

        $views = [
            ["comment/default-form", ["form" => $form->getHTML()], "main"]
        ];

        $this->di->get("pageRenderComment")->renderPage([
            "views" => $views,
            "title" => "Edit post | $id"
        ]);
    }
571923
public function getQuestion4Id($id)
    {
        $query = $this->createQueryBuilder('p')
            ->select('p')
            ->where('p.id = :id')
            ->setParameter('id', $id)
            ->getQuery();


        return $query->getOneOrNullResult();
    }
1345420
protected function _post($id = null)
    {
        $subject = $this->_subject();
        $subject->set(['id' => $id]);

        $entity = $this->_findRecord($id, $subject);

        $event = $this->_trigger('beforeDelete', $subject);
        if ($event->isStopped()) {
            return $this->_stopped($subject);
        }

        $method = $this->getConfig('deleteMethod');
        if ($this->_table()->$method($entity)) {
            $this->_success($subject);
        } else {
            $this->_error($subject);
        }

        return $this->_redirect($subject, ['action' => 'index']);
    }
275716
protected function _updateObject( $post_id, $fields ) {
		$fields['ID'] = $post_id;
		$updated = wp_update_post( $fields );
		if ( $updated && ! is_wp_error( $updated ) ) {
			$this->_debug( 'Updated post ' . $post_id );
		} elseif ( is_wp_error( $updated ) ) {
			$this->_debug(
				'Update failed for post %d with message [%s] %s',
				$post_id,
				$updated->get_error_code(),
				$updated->get_error_message()
			);
		} else {
			$this->_debug( 'Update failed for post ' . $post_id );
		}

		return $updated;
	}
449433
protected function getId($id = null)
    {
        $id = (empty($id)) ? $this->resourceId : $id;
        if (empty($id)) {
            throw new \Exception('Invalid id supplied [' . $id . ']. Operation requires valid resource id.');
        }

        return $id;
    }
866508
public function getPostUpdateUser($id)
    {
        $loggedInUser = $this->userService->getCurrentLoggedInUser();

        if (!$loggedInUser) {
            $this->response->redirect("user/login");
            return false;
        }

        if ($loggedInUser->id != $id) {
            if (!$loggedInUser->administrator) {
                $this->response->redirect("");
            }
        }

        $title      = "Uppdatera användaren";
        $form       = new UpdateUserForm($this->di, $id);

        $form->check();

        $data = [
            "content" => $form->getHTML(),
        ];

        $this->view->add("default2/article", $data);

        $this->pageRender->renderPage(["title" => $title]);
    }
1007195
public function delete($id)
    {
        $this->preDelete($id);
        $result = $this->dataStore->delete($id);

        return $this->postDelete($result, $id);
    }
624682
protected function __apiUpdate(string $id)
    {
        $record = HCPages::findOrFail($id);

        $data = $this->getInputData();

        $record->update(array_get($data, 'record'));
        $record->updateTranslations(array_get($data, 'translations'));
        $record->categories()->sync(array_get($data, 'categories', []));
        $record->removeCachedMenu();

        return $this->apiShow($record->id);
    }
193218
protected function getAbstractId($id)
    {
        if (isset($this->aliases[$id])) {
            $id = $this->aliases[$id];
        }

        return $id;
    }
1047130
public function deleteById($id)
    {
        $deleteResult = $this->getRequest()->request(
            'DELETE',
            $this->getRequestUrl(sprintf('inputs/%s', $id))
        );

        return $deleteResult['status'];
    }