function hosting_get_client in Hosting 5
Same name and namespace in other branches
- 6.2 client/hosting_client.module \hosting_get_client()
- 7.4 client/hosting_client.module \hosting_get_client()
- 7.3 client/hosting_client.module \hosting_get_client()
5 calls to hosting_get_client()
File
- client/
hosting_client.module, line 73
Code
function hosting_get_client($client) {
if (is_numeric($client)) {
$result = db_result(db_query("SELECT n.nid FROM {hosting_client} h INNER JOIN {node} n ON n.nid = h.nid WHERE n.nid = %d", $client));
}
else {
$result = db_result(db_query("SELECT c.nid FROM {hosting_client} c JOIN {node} n ON c.nid = n.nid WHERE (n.title = '%s' OR c.email = '%s') AND n.type = 'client'", $client, $client));
}
if ($result) {
return node_load($result);
}
return false;
}