function pmteam_autocomplete in Drupal PM (Project Management) 7
Function to return an autocomplete list for Project Management Teams
File
- pmteam/
pmteam.module, line 387 - Functionality for the Project Management Team module Organized into the following sections:
Code
function pmteam_autocomplete($string = '') {
$matches = array();
if ($string) {
// @todo Convert to DBTNG
$s = "SELECT title FROM {node} AS n WHERE n.type='pmteam' AND LOWER(title) LIKE LOWER('%%%s%%')";
// ->addTag('node_access')
$result = db_query_range($s, $string, 0, 10);
while ($team = db_fetch_object($result)) {
$matches[$team->title] = check_plain($team->title);
}
}
drupal_json($matches);
}