本文整理汇总了PHP中tep_db_data_seek函数的典型用法代码示例。如果您正苦于以下问题:PHP tep_db_data_seek函数的具体用法?PHP tep_db_data_seek怎么用?PHP tep_db_data_seek使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了tep_db_data_seek函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tep_random_select
function tep_random_select($query)
{
$random_product = '';
$random_query = tep_db_query($query);
$num_rows = tep_db_num_rows($random_query);
if ($num_rows > 0) {
$random_row = tep_rand(0, $num_rows - 1);
tep_db_data_seek($random_query, $random_row);
$random_product = tep_db_fetch_array($random_query);
}
return $random_product;
}
示例2: tep_db_result
function tep_db_result($result, $row, $field = '')
{
if ($field === '') {
$field = 0;
}
tep_db_data_seek($result, $row);
$data = tep_db_fetch_array($result);
return $data[$field];
}
示例3: tep_db_data_seek
if ($product_row['products_id'] == (int) $_GET['products_id']) {
if ($product_row = tep_db_fetch_array($products_ids)) {
$next_item = $product_row['products_id'];
}
break;
} else {
$previous = $product_row['products_id'];
}
}
}
// Products Id of the first product in the category
tep_db_data_seek($products_ids, 0);
$product_row = tep_db_fetch_array($products_ids);
$first = $product_row['products_id'];
// Products Id of the last product in the category
tep_db_data_seek($products_ids, $counter - 1);
$product_row = tep_db_fetch_array($products_ids);
$last = $product_row['products_id'];
if ($counter > 1) {
?>
<!-- Next Previous Module Starts -->
<table border="0" cellspacing="0" cellpadding="3">
<tr>
<?php
if ($first != (int) $_GET['products_id']) {
?>
<td align="right" class="main" width="40"><?php
echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "{$fPath}&products_id={$first}") . '">' . tep_image(DIR_WS_ICONS . 'control_start.png', ALT_FIRST_PRODUCT) . '</a> <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "{$fPath}&products_id={$previous}") . '">' . tep_image(DIR_WS_ICONS . 'control_rewind.png', ALT_PREVIOUS_PRODUCT) . '</a>';
?>
</td>
<?php