forked from science-ation/science-ation
A quick function update
This commit is contained in:
parent
e4d94ffca2
commit
89475dae93
@ -737,18 +737,18 @@ function getTextFromHtml($html) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getUserForSponsor($sponsor_id) {
|
function getUserForSponsor($sponsor_id) {
|
||||||
// loop through each contact and draw a form with their data in it.
|
// fetch the data for a specific sponsor
|
||||||
$q = mysql_query("SELECT *,MAX(year) FROM users LEFT JOIN users_sponsor ON users_sponsor.users_id=users.id
|
$q = mysql_query("SELECT * , MAX( conferences_id ) FROM users
|
||||||
WHERE
|
LEFT JOIN user_roles ON user_roles.users_id = users.id
|
||||||
sponsors_id='" . $sponsor_id . "'
|
JOIN roles ON roles.id = user_roles.roles_id
|
||||||
AND types LIKE '%sponsor%'
|
WHERE sponsors_id = '" . $sponsor_id . "'
|
||||||
GROUP BY uid
|
AND roles.type = 'sponsor'
|
||||||
HAVING deleted='no'
|
GROUP BY users.id
|
||||||
ORDER BY users_sponsor.primary DESC,lastname,firstname
|
HAVING deleted = 'no'
|
||||||
LIMIT 1
|
ORDER BY users.`primary` DESC , lastname, firstname
|
||||||
");
|
LIMIT 1");
|
||||||
$r=mysql_fetch_object($q);
|
$r=mysql_fetch_object($q);
|
||||||
return user_load_by_uid($r->uid);
|
return user_load($r->uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
function projectdivisions_load($conferences_id = false) {
|
function projectdivisions_load($conferences_id = false) {
|
||||||
|
Loading…
Reference in New Issue
Block a user