function SearchProducts() { /* constructor */
$this->methodTable = array(
'getSearchResult' => array(
'description' => 'Searches
the database and returns a result.',
'access' => 'remote',
'arguments' => array('search')
)
);
}
function getSearchResult($search) {
if (!$link = mysql_pconnect('localhost',
'myUsername', 'myPassword'))
return mysql_error();
if (!mysql_select_db('Northwind', $link))
return mysql_error();
if (!($result = mysql_query($query, $link)))
return mysql_error();
return $result;
}
}
?>