當前位置: 首頁>>代碼示例>>PHP>>正文


PHP tep_db_data_seek函數代碼示例

本文整理匯總了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;
}
開發者ID:CristianCCIT,項目名稱:shop4office,代碼行數:12,代碼來源:general.php

示例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];
}
開發者ID:zel777,項目名稱:Responsive-osCommerce,代碼行數:9,代碼來源:database.php

示例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 
開發者ID:digideskio,項目名稱:oscmax2,代碼行數:31,代碼來源:products_next_previous.php


注:本文中的tep_db_data_seek函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。