You are here

function _eloqua_modify_query in Eloqua 6

Updates/Delete data into the database Returns TRUE if the query succeeded and modified at least one row

Parameters

$sql string: Query

$params array: Query Parameters

Return value

boolean Success Status

4 calls to _eloqua_modify_query()
_eloqua_post_delete in ./eloqua.inc
Deletes a post object from the database
_eloqua_post_update in ./eloqua.inc
Updates the post object from the database
_eloqua_webform_delete in ./eloqua.inc
Deletes a webform object from the database
_eloqua_webform_update in ./eloqua.inc
Updates the webform object from the database

File

./eloqua.inc, line 668

Code

function _eloqua_modify_query($sql, $params) {
  $result = db_query($sql, $params);

  // The result must be the post_id or we'll end up with duplicate records in
  //   the eloqua_saved_posts table.
  if ($result === FALSE || $result === NULL) {
    $result = false;
  }
  if ($result) {
    $rows_changed = db_affected_rows();
    $result = $rows_changed > 0;
  }
  return $result;
}