You are here

function _eloqua_post_update in Eloqua 7.2

Same name and namespace in other branches
  1. 6 eloqua.inc \_eloqua_post_update()
  2. 7 eloqua_webform/eloqua_webform.inc \_eloqua_post_update()

Updates the post object from the database.

Parameters

object $post: The post object.

Return value

bool The result of the update.

2 calls to _eloqua_post_update()
eloqua_post_create in eloqua_webform/eloqua_webform.inc
Creates a post into the database.
eloqua_post_update in eloqua_webform/eloqua_webform.inc
Updates a post from the database.
1 string reference to '_eloqua_post_update'
eloqua_post_update in eloqua_webform/eloqua_webform.inc
Updates a post from the database.

File

eloqua_webform/eloqua_webform.inc, line 358
Eloqua Helper functions and constants

Code

function _eloqua_post_update($post) {
  $fields = array(
    'form_id' => $post->{'form_id'},
    'post_time' => $post->{'post_time'},
    'status' => $post->{'status'},
    'data' => serialize($post->{'data'}),
  );
  $result = db_update('eloqua_saved_posts')
    ->fields($fields)
    ->condition('post_id', $post->{'post_id'})
    ->execute();
  return is_numeric($result) ? $result > 0 : FALSE;
}