function _mobile_codes_update_sql in Mobile Codes 6.2
Perform an SQL query and return success or failure.
Parameters
$sql: A string containing a complete SQL query.
Return value
An array containing the keys: success: a boolean indicating whether the query succeeded query: the SQL query executed, passed through check_plain() rows: number of rows effected
See also
http://api.drupal.org/api/function/update_sql/6
1 call to _mobile_codes_update_sql()
- mobile_codes_update_6200 in ./
mobile_codes.install - Implements hook_update_N().
File
- ./
mobile_codes.install, line 185
Code
function _mobile_codes_update_sql($sql) {
$args = func_get_args();
array_shift($args);
$result = db_query($sql, $args);
$sql = _mobile_codes_return_query_string($sql, $args);
return array(
'success' => $result !== FALSE,
'query' => check_plain($sql),
'rows' => db_affected_rows(),
);
}