本文整理汇总了PHP中Products::GetList方法的典型用法代码示例。如果您正苦于以下问题:PHP Products::GetList方法的具体用法?PHP Products::GetList怎么用?PHP Products::GetList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Products
的用法示例。
在下文中一共展示了Products::GetList方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Products
<div align="right">
<span></span>联系电话:</div>
</td>
<td width="482">
<input type="text" name="mobile" id="mobile" size="30" />
</td>
</tr>
<tr>
<td width="136">
<div align="right">
<span></span>产品:</div>
</td>
<td width="482">
<?php
$product = new Products();
$product_data = $product->GetList(array('id', 'title', 'price'), '', '', '', 'addtime desc');
?>
<select name="product_id" style="margin-left:2px ; padding:2px ; height:25px ; width:300px ;">
<?php
if ($product_data) {
foreach ($product_data as $product_key => $product_value) {
?>
<option value="<?php
echo $product_value['id'];
?>
">
<?php
echo $product_value['title'] . " " . $product_value['price'] . "元";
?>
示例2: array
$info = array();
$time = time();
if (isset($id)) {
$id = intval($id);
if ($id <= 0) {
errorinfo('变量错误', '');
}
$info = $products_photo->GetInfo('', ' id = ' . $id);
if (empty($info)) {
errorinfo('变量错误', '');
}
$productinfo = $products->GetInfo('', ' id = ' . $info['productid']);
//20120719
checkClassPower('products', $productinfo['classid']);
}
$classList = $products->GetList();
//$classList = $CL->arraySet($classList,0);
if (is_file(WEB_TPL . 'products_photo_edit.tpl.php')) {
$templatefile = 'products_photo_edit.tpl.php';
} else {
$tpl_in_module = 1;
$templatefile = $moduleRoot . WEB_APP . 'templates/' . 'products_photo_edit.tpl.php';
}
}
break;
case 'search':
//
break;
case 'show':
//
break;
示例3: isset
}
if (isset($filename) && !empty($filename)) {
$where = $where . " and `classid` = '" . $info['id'] . "' ";
}
$pageListNum = 9;
//每页显示
//20120715
if (intval($info['listnum']) > 0) {
$pageListNum = $info['listnum'];
}
$totalPage = 0;
//总页数
$page = isset($page) ? (int) $page : 1;
$start = ($page - 1) * $pageListNum;
//执行sql
$List = $products->GetList(array('id', 'classid', 'title', 'filename', 'addtime', 'thumb', 'intro', 'titlecolor', 'author', 'clicks', 'istop'), $start, $pageListNum, $where, 'istop desc,addtime desc,id desc');
//*******************************************查询产品信息 END ******************************************************
include WEB_INC . "page.class.php";
//******************************************* 查询产品信息长度,设置分页 ******************************************************
$sqlNum = "select id from {tablepre}products where " . $where;
$db->Execute($sqlNum);
$pageNum = $db->GetRsNum();
$totalPage = ceil($pageNum / $pageListNum);
//总页数
$pages = new PageClass($page, $totalPage);
$showpage = $pages->showPage();
//******************************************* 查询产品信息长度,设置分页 END ******************************************************
if (is_file(WEB_TPL . 'products_list.tpl.php')) {
$templatefile = 'products_list.tpl.php';
} else {
$tpl_in_module = 1;