You are here

function _eloqua_post_update in Eloqua 6

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

Updates the post object from the database

Parameters

$post object:

Return value

boolean

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

File

./eloqua.inc, line 587

Code

function _eloqua_post_update($post) {
  $sql = 'UPDATE ' . ELOQUA_SCHEMA_SAVED_POSTS . ' SET ' . ELOQUA_POST_FIELD_FORM_ID . " = '%s'," . ELOQUA_POST_FIELD_POST_TIME . ' = %d, ' . ELOQUA_POST_FIELD_STATUS . " = '%s', " . ELOQUA_POST_FIELD_DATA . " = '%s' " . ' WHERE ' . ELOQUA_POST_FIELD_POST_ID . ' = %d';
  $params = array(
    $post->{ELOQUA_POST_FIELD_FORM_ID},
    $post->{ELOQUA_POST_FIELD_POST_TIME},
    $post->{ELOQUA_POST_FIELD_STATUS},
    serialize($post->{ELOQUA_POST_FIELD_DATA}),
    $post->{ELOQUA_POST_FIELD_POST_ID},
  );
  $result = _eloqua_modify_query($sql, $params);
  return $result;
}