terms not affiliated with the two branches of the PO (anatomy, and
growth & development stages).
svn path=/; revision=121
: die('"field" is a required parameter and must match an available data field.');
$number_of_terms = isset($_GET['max']) ? intval($_GET['max']) : 10; //10 is the default
+ if ($number_of_terms > 50) { $number_of_terms = 50; }
$qval = $_GET['qval'];
$query = "SELECT t.$field FROM term t"
. " LEFT JOIN term_definition d ON d.term_id = t.id"
. " WHERE t.$field LIKE '%$qval%'"
+ . " AND t.term_type in ('plant_anatomy','plant_growth_and_development_stage')"
. " AND UCASE(t.name) NOT LIKE 'OBSOLETE%'"
. " AND UCASE(d.term_definition) NOT LIKE 'OBSOLETE%'"
. " ORDER BY name LIMIT $number_of_terms";