function vars_test_search_variable in Variable API 7.2
Same name and namespace in other branches
- 6.2 tests/vars.test \vars_test_search_variable()
- 6 tests/vars.test \vars_test_search_variable()
- 7 tests/vars.test \vars_test_search_variable()
Checks the variables table doesn't contain a value for the Drupal variable passed as argument.
Parameters
$name: The name of the Drupal variable.
Return value
TRUE, if the table contains the default value for the Drupal variable.
4 calls to vars_test_search_variable()
File
- tests/
vars.test, line 361 - Test file for the Variable API module.
Code
function vars_test_search_variable($name) {
return (bool) db_query_range('SELECT 1 FROM {variable} WHERE name = :name', 0, 1, array(
':name' => $name,
))
->fetchField();
}