0
我已經做了一個模塊Joomla使用PHP和MySQL,一個函數正確提取一個用戶在線,然後將結果傳遞給另一個函數,提取一個數組。array php retrive value
這些是類
<?php
class modUno
{
public static function due()
{
$db = JFactory::getDBO();
$query = "SELECT userid FROM #__session WHERE EXISTS (SELECT 'avatar, cb_skipe' FROM #__comprofiler) ORDER BY RAND() LIMIT 1;";
$db->setQuery($query);
$result = $db->loadResult();
return $result;
}
public static function tre()
{
$risultato = modUno::due();
$db = JFactory::getDBO();
$query = "SELECT avatar, cb_skipe FROM #__comprofiler WHERE id = '{$risultato}'; ";
$db->setQuery($query);
$result = array($db->loadResult());
return $result;
}
}
?>
然後我與這些模塊檢索該值
<?php
defined('_JEXEC') or die('Restricted access');
require_once(dirname(__FILE__).'/helper.php');
$foto = ? i dont know ;
$skipe = ? i dont know ;
require JModuleHelper::getLayoutPath('mod_chat');
?>
怎麼可以檢索數組(二值)的值和分配給$照片和$滑動?