" . substr($x, 0, strlen($var)) . "" . substr($x, strlen($var), strlen($x) - strlen($var)); else return $x; } function getTaxonList($query) { $max_rows = 50; $p = $query->getParam(0); $pat = ucfirst($p->scalarval()); $p = $query->getParam(1); $table = str_replace('field_', 'suggest', $p->scalarval()); $sql = "select Name, unitCount from $table where Name LIKE '$pat%' LIMIT ".$max_rows; // mysql_connect('130.133.70.45', 'webuser' , ''); // mysql_select_db('syn_europe'); $link =mysql_connect('130.133.70.51', 'webuser' , '') or die("Impossible de se connecter : " . mysql_error()); mysql_select_db('caucasus'); $result = mysql_query($sql); $s = ""; $i = 0; while ( ($row = mysql_fetch_array($result))) { $s .= "