本文整理汇总了PHP中ps_DB::loadAssocList方法的典型用法代码示例。如果您正苦于以下问题:PHP ps_DB::loadAssocList方法的具体用法?PHP ps_DB::loadAssocList怎么用?PHP ps_DB::loadAssocList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ps_DB
的用法示例。
在下文中一共展示了ps_DB::loadAssocList方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
<br />
<?php
$listObj->startTable();
// these are the columns in the table
$checklimit = $num_rows < $limit ? $num_rows : $limit;
$columns = array("#" => "width=\"20\"", "<input type=\"checkbox\" name=\"toggle\" value=\"\" onclick=\"checkAll(" . $checklimit . ")\" />" => "width=\"20\"", $zas_modul->lang('order_exported') => "width=\"20\"", $zas_modul->lang('order_number') => '', $zas_modul->lang('customer_name') => '', $zas_modul->lang('cod') => '', 'Zasilkovna' => '', $zas_modul->lang('order_date') => '', $zas_modul->lang('total') => '', $zas_modul->lang('order_remove') => "width=\"5%\"");
$listObj->writeTableHeader($columns);
// so we can determine if shipping labels can be printed
$dbl = new ps_DB();
$db->query($list);
//get list of exported orders
$vm_db = new ps_DB();
$q = "SELECT order_id ";
$q .= "FROM #__zasilkovna_orders where exported='1' ";
$vm_db->query($q);
$exported_orders_arr = $vm_db->loadAssocList('order_id');
$export_url = JURI::base(false) . "index.php?pshop_mode=admin&page={$modulename}." . $mod_name . "_export&option=com_virtuemart";
$self_url = JURI::base(false) . "index.php?pshop_mode=admin&page={$modulename}." . $mod_name . "&option=com_virtuemart";
$listObj->newRow();
$i = 0;
while ($db->next_record()) {
//$listObj->newRow("\" style=\"background-color: red;");
$listObj->newRow();
// The row number
$listObj->addCell($pageNav->rowNumber($i));
// The Checkbox
$listObj->addCell('<input type="checkbox" class="zasilkovna-cb" id="cb' . $i . '" name="orders_id[]" value="' . $db->f("order_id") . '" >');
// Is exported?
if ($exported_orders_arr[$db->f("order_id")]['order_id'] == $db->f("order_id")) {
$is_exported = $zas_modul->lang('yes');
} else {
示例2: checkMenuItems
function checkMenuItems($parameter, $value)
{
global $mainframe;
$db = new ps_DB();
if (!isset($mainframe->vm_menuitems)) {
$db->setQuery("SELECT id, params FROM #__menu WHERE link='index.php?option=com_virtuemart' AND published=1");
$mainframe->vm_menuitems = $db->loadAssocList();
if (!is_array($mainframe->vm_menuitems)) {
$mainframe->vm_menuitems = array();
// Query failed, empty result
}
}
foreach ($mainframe->vm_menuitems as $chkmenu) {
if (strpos($chkmenu['params'], $parameter . "=" . $value . "\n") !== false) {
return $chkmenu['id'];
}
}
return false;
}