$sql->query("SELECT 'entry_uid' FROM pivotx_comments GROUP BY 'entry_uid' ORDER BY 'date' DESC LIMIT 20;"); $sql->query("SELECT entry_uid FROM pivotx_comments GROUP BY entry_uid ORDER BY 'date DESC LIMIT 20;");// Assign them in smarty
$this->assign('latest_uids', $rows);[[ subweblog .. uid=$latest_uids ]] ... [[/subweblog ]]
$this->assign('test_var', 'Marza was here');
echo $test_var;$this->assign('latest_uids', array($rows));// create object
$testthis = new Smarty;
$testthis->assign('latest_uids', $rows);
echo $latest_uids;
[[php]]
global $PIVOTX;
$sql = new sql('mysql',
$PIVOTX['config']->get('db_databasename'),
$PIVOTX['config']->get('db_hostname'),
$PIVOTX['config']->get('db_username'),
$PIVOTX['config']->get('db_password')
);
$sql->query("SELECT entry_uid FROM pivotx_comments GROUP BY entry_uid ORDER BY `date` DESC LIMIT 20;");
// Get the results.
$rows = $sql->fetch_all_rows();
// make them manageable..
$rows = implode(', ', make_valuepairs($rows, '', 'entry_uid'));
// Assign them in smarty
$this->assign('latest_uids', $rows);
[[/php]]
[[ $latest_uids ]] $sql->query("SELECT entry_uid FROM pivotx_comments ORDER BY `date` DESC LIMIT 20;");$sql->query("SELECT entry_uid FROM pivotx_comments ORDER BY `date` DESC;");Users browsing this forum: No registered users and 1 guest