getParam(0); $query = $q->scalarval(); $sql = "select taxonName, unitCount from suggest where taxonName LIKE '$query%' order by taxonName LIMIT ".$max_rows; mysql_connect('192.168.2.10', 'webuser' , ''); mysql_select_db('synthesys'); $result = mysql_query($sql); $s = ""; $i = 0; while ( ($row = mysql_fetch_array($result))) { $s .= "
" . $row['taxonName'] . " (" . number_format($row['unitCount'],0 , ',', '.') . ")
"; } if (mysql_num_rows($result) == $max_rows) $s .= "
..."; return new xmlrpcresp(new xmlrpcval($s, 'string')); } // Declare our signature and provide some documentation. $sig = array(array($xmlrpcString, $xmlrpcString)); $doc = 'bla'; new xmlrpc_server(array( 'suggest.getTaxonList' => array( 'function' => 'getTaxonList', 'signature' => $sig, 'docstring' => $doc ))); ?>