2011-09-25 54 views

回答

0

如果您想通過研討會號/代碼來獲得組織者的姓名:

$number = "123"; // here the number to search 
$db = &JFactory::getDBO(); 
$q = "SELECT name FROM #__users u INNER JOIN #__seminar s ON (u.id=s.publisher) WHERE s.semnum='".$number."'"; 
$db->setQuery($q); 
$organisername = $db->loadResult(); 

您可以更改查詢作爲您的需求,例如通過研討會ID搜索:

$q = "SELECT name FROM #__users u INNER JOIN #__seminar s ON (u.id=s.publisher) WHERE s.id='".$id."'"; 
+0

非常感謝你! – Sylph