function bb2_db_query in Bad Behavior 6.2
Same name and namespace in other branches
- 5.2 badbehavior.module \bb2_db_query()
- 6 badbehavior.module \bb2_db_query()
- 7.2 badbehavior.module \bb2_db_query()
Run a query and return the results, if any.
Parameters
type $query:
Return value
object
1 call to bb2_db_query()
- bb2_install in ./
badbehavior.module - Installation of Bad Behavior
File
- ./
badbehavior.module, line 163 - Integrates Bad Behavior with Drupal
Code
function bb2_db_query($query) {
set_error_handler('badbehavior_db_errortrap');
// Remove security-sensitive data
$query = badbehavior_strip_passwords($query);
$result = db_query($query);
restore_error_handler();
if ($result == FALSE) {
return FALSE;
}
return db_affected_rows();
}