function _eloqua_select_all_query in Eloqua 6
Performs a select query returning the result If the option ('data') is set, then will unserialize the data column
Parameters
$sql string:
$params array:
$options array:
Return value
object|FALSE
1 call to _eloqua_select_all_query()
File
- ./
eloqua.inc, line 721
Code
function _eloqua_select_all_query($sql, $params, $options = array()) {
$result = db_query($sql, $params);
$rowset = array();
if ($result !== FALSE) {
$row = FALSE;
do {
$row = db_fetch_object($result);
if (!empty($row)) {
// Capture any unserialization errors, and validate the result
if (!empty($options[ELOQUA_QUERY_OPTION_UNSERIALIZE_DATA])) {
$row->data = unserialize($row->data);
if ($row->data === FALSE) {
$row->data = new stdClass();
}
}
$rowset[] = $row;
}
} while (!empty($row));
}
return $rowset;
}