• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP olc_db_num_rows函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中olc_db_num_rows函数的典型用法代码示例。如果您正苦于以下问题:PHP olc_db_num_rows函数的具体用法?PHP olc_db_num_rows怎么用?PHP olc_db_num_rows使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了olc_db_num_rows函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: query

 function query($order_id)
 {
     $order_query = olc_db_query("\n\t\tselect\n\t\tcustomers_name,\n\t\tcustomers_cid,\n\t\tcustomers_id,\n\t\tcustomers_company,\n\t\tcustomers_street_address,\n\t\tcustomers_suburb,\n\t\tcustomers_city,\n\t\tcustomers_postcode,\n\t\tcustomers_state,\n\t\tcustomers_country,\n\t\tcustomers_telephone,\n\t\tcustomers_email_address,\n\t\tcustomers_address_format_id,\n\t\tdelivery_name,\n\t\tdelivery_company,\n\t\tdelivery_street_address,\n\t\tdelivery_suburb,\n\t\tdelivery_city,\n\t\tdelivery_postcode,\n\t\tdelivery_state,\n\t\tdelivery_country,\n\t\tdelivery_address_format_id,\n\t\tbilling_name,\n\t\tbilling_company,\n\t\tbilling_street_address,\n\t\tbilling_suburb,\n\t\tbilling_city,\n\t\tbilling_postcode,\n\t\tbilling_state,\n\t\tbilling_country,\n\t\tbilling_address_format_id,\n\t\tbilling_invoice_number,\n\t\tpayment_method,\n\t\tcc_type,\n\t\tcc_owner,\n\t\tcc_number,\n\t\tcc_expires,\n\t\tcomments,\n\t\tcurrency,\n\t\tcurrency_value,\n\t\tdate_purchased,\n\t\torders_status,\n\t\torders_trackcode,\n\t\tlast_modified,\n\t\tpayment_id,\n\t\tcustomers_status,\n\t\tcustomers_status_name,\n\t\tcustomers_status_image,\n\t\tcustomers_ip,\n\t\tlanguage,\n\t\tcustomers_status_discount\n\t\tfrom " . TABLE_ORDERS . " where\n\t\torders_id = '" . olc_db_input($order_id) . APOS);
     $order = olc_db_fetch_array($order_query);
     $totals_query = olc_db_query("select title, text from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . olc_db_input($order_id) . "' order by sort_order");
     while ($totals = olc_db_fetch_array($totals_query)) {
         $this->totals[] = array('title' => $totals['title'], 'text' => $totals['text']);
     }
     $this->info = array('order_id' => $order_id, 'currency' => $order['currency'], 'currency_value' => $order['currency_value'], 'payment_method' => $order['payment_method'], 'status' => $order['customers_status'], 'status_name' => $order['customers_status_name'], 'status_image' => $order['customers_status_image'], 'status_discount' => $order['customers_status_discount'], 'cc_type' => $order['cc_type'], 'cc_owner' => $order['cc_owner'], 'cc_number' => $order['cc_number'], 'cc_expires' => $order['cc_expires'], 'comments' => $order['comments'], 'language' => $order['language'], 'date_purchased' => $order['date_purchased'], 'payment_id' => $order['payment_id'], 'orders_status' => $order['orders_status'], 'orders_trackcode' => $order['orders_trackcode'], 'last_modified' => $order['last_modified']);
     $this->customer = array('name' => $order['customers_name'], 'id' => $order['customers_id'], 'company' => $order['customers_company'], 'csID' => $order['customers_cid'], 'shop_id' => $order['shop_id'], 'id' => $order['customers_id'], 'cIP' => $order['customers_ip'], 'street_address' => $order['customers_street_address'], 'suburb' => $order['customers_suburb'], 'city' => $order['customers_city'], 'postcode' => $order['customers_postcode'], 'state' => $order['customers_state'], 'country' => $order['customers_country'], 'format_id' => $order['customers_address_format_id'], 'telephone' => $order['customers_telephone'], 'email_address' => $order['customers_email_address']);
     $this->delivery = array('name' => $order['delivery_name'], 'company' => $order['delivery_company'], 'street_address' => $order['delivery_street_address'], 'suburb' => $order['delivery_suburb'], 'city' => $order['delivery_city'], 'postcode' => $order['delivery_postcode'], 'state' => $order['delivery_state'], 'country' => $order['delivery_country'], 'format_id' => $order['delivery_address_format_id']);
     $this->billing = array('name' => $order['billing_name'], 'company' => $order['billing_company'], 'street_address' => $order['billing_street_address'], 'suburb' => $order['billing_suburb'], 'city' => $order['billing_city'], 'postcode' => $order['billing_postcode'], 'state' => $order['billing_state'], 'country' => $order['billing_country'], 'format_id' => $order['billing_address_format_id'], 'billing_invoice_number' => $order['billing_invoice_number']);
     $index = 0;
     $orders_products_query = olc_db_query("\n\t\t\tselect\n\t\t\torders_products_id,\n\t\t\tproducts_name,\n\t\t\tproducts_id,\n\t\t\tproducts_model,\n\t\t\tproducts_price,\n\t\t\tproducts_tax,\n\t\t\tproducts_quantity,\n\t\t\tfinal_price,\n\t\t\tallow_tax,\n\t\t\tproducts_discount_made\n\t\t\tfrom " . TABLE_ORDERS_PRODUCTS . "\n\t\t\twhere\n\t\t\torders_id ='" . olc_db_input($order_id) . APOS);
     while ($orders_products = olc_db_fetch_array($orders_products_query)) {
         $this->products[$index] = array('id' => $orders_products['products_id'], 'orders_products_id' => $orders_products['orders_products_id'], 'qty' => $orders_products['products_quantity'], 'name' => $orders_products['products_name'], 'model' => $orders_products['products_model'], 'tax' => $orders_products['products_tax'], 'price' => $orders_products['products_price'], 'discount' => $orders_products['products_discount_made'], 'final_price' => $orders_products['final_price'], 'allow_tax' => $orders_products['allow_tax'], 'auctionid' => $orders_products['auctionid']);
         $subindex = 0;
         $attributes_query = olc_db_query("\n\t\t\t\tselect\n\t\t\t\tproducts_options,\n\t\t\t\tproducts_options_values,\n\t\t\t\tproducts_options_id,\n\t\t\t\tproducts_options_values_id,\n\t\t\t\toptions_values_price,\n\t\t\t\tprice_prefix from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " where orders_id = '" . olc_db_input($order_id) . "' and orders_products_id = '" . $orders_products['orders_products_id'] . APOS);
         if (olc_db_num_rows($attributes_query)) {
             while ($attributes = olc_db_fetch_array($attributes_query)) {
                 $this->products[$index]['attributes'][$subindex] = array('option' => $attributes['products_options'], 'value' => $attributes['products_options_values'], 'option_id' => $attributes['products_options_id'], 'value_id' => $attributes['products_options_values_id'], 'prefix' => $attributes['price_prefix'], 'price' => $attributes['options_values_price']);
                 $subindex++;
             }
         }
         $index++;
     }
 }
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:27,代码来源:order.php


示例2: olc_display_banner

function olc_display_banner($action, $identifier)
{
    if ($action == 'dynamic') {
        $banners_query = olc_db_query(SELECT_COUNT . " as count from " . TABLE_BANNERS . " where status = '1' and banners_group = '" . $identifier . APOS);
        $banners = olc_db_fetch_array($banners_query);
        if ($banners['count'] > 0) {
            $banner = olc_random_select("select banners_id, banners_title, banners_image, banners_html_text from " . TABLE_BANNERS . " where status = '1' and banners_group = '" . $identifier . APOS);
        } else {
            return '<b>OLC ERROR! (olc_display_banner(' . $action . ', ' . $identifier . ') -> No banners with group \'' . $identifier . '\' found!</b>';
        }
    } elseif ($action == 'static') {
        if (is_array($identifier)) {
            $banner = $identifier;
        } else {
            $banner_query = olc_db_query("select banners_id, banners_title, banners_image, banners_html_text from " . TABLE_BANNERS . " where status = '1' and banners_id = '" . $identifier . APOS);
            if (olc_db_num_rows($banner_query)) {
                $banner = olc_db_fetch_array($banner_query);
            } else {
                return '<b>OLC ERROR! (olc_display_banner(' . $action . ', ' . $identifier . ') -> Banner with id \'' . $identifier . '\' not found, or status inactive</b>';
            }
        }
    } else {
        return '<b>OLC ERROR! (olc_display_banner(' . $action . ', ' . $identifier . ') -> Unknown $action parameter value - it must be either \'dynamic\' or \'static\'' . HTML_B_END;
    }
    if (olc_not_null($banner['banners_html_text'])) {
        $banner_string = $banner['banners_html_text'];
    } else {
        $banner_string = HTML_A_START . olc_href_link(FILENAME_REDIRECT, 'action=banner&goto=' . $banner['banners_id']) . '" target="_blank">' . olc_image(DIR_WS_IMAGES . 'banner/' . $banner['banners_image'], $banner['banners_title']) . HTML_A_END;
    }
    olc_update_banner_display_count($banner['banners_id']);
    return $banner_string;
}
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:32,代码来源:olc_display_banner.inc.php


示例3: olc_random_select

function olc_random_select($query, $rows = 1)
{
    global $random_rows;
    $random_product = '';
    $random_query = olc_db_query($query);
    $num_rows = olc_db_num_rows($random_query);
    if ($num_rows > 1) {
        $num_rows1 = $num_rows - 1;
        for ($row = 1; $row <= $rows; $row++) {
            $tries = 0;
            $random_row = olc_rand(0, $num_rows1);
            $random_row_store = "|" . $random_row . "|";
            $include_row = true;
            while (!(strpos($random_rows, $random_row_store) === false)) {
                $tries++;
                if ($tries > 10) {
                    $include_row = false;
                    break;
                } else {
                    $random_row = olc_rand(0, $num_rows1);
                }
            }
            if ($include_row) {
                $random_rows .= $random_row_store;
                olc_db_data_seek($random_query, $random_row);
                $random_product[] = olc_db_fetch_array($random_query);
            }
        }
    } else {
        if ($num_rows > 0) {
            $random_product[] = olc_db_fetch_array($random_query);
        }
    }
    return $random_product;
}
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:35,代码来源:olc_random_select.inc.php


示例4: check

 function check()
 {
     if (!isset($this->_check)) {
         $check_query = olc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_SUBTOTAL_NO_TAX_STATUS'");
         $this->_check = olc_db_num_rows($check_query);
     }
     return $this->_check;
 }
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:8,代码来源:ot_subtotal_no_tax.php


示例5: olc_expire_specials

function olc_expire_specials()
{
    $specials_query = olc_db_query("select specials_id from " . TABLE_SPECIALS . " where status = '1' and now() >= expires_date and expires_date > 0");
    if (olc_db_num_rows($specials_query)) {
        while ($specials = olc_db_fetch_array($specials_query)) {
            olc_set_specials_status($specials['specials_id'], '0');
        }
    }
}
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:9,代码来源:olc_expire_specials.inc.php


示例6: olc_currency_exists

function olc_currency_exists($code)
{
    $currency_code = olc_db_query("select currencies_id from " . TABLE_CURRENCIES . " where code = '" . $code . APOS);
    if (olc_db_num_rows($currency_code)) {
        return $code;
    } else {
        return false;
    }
}
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:9,代码来源:olc_currency_exists.inc.php


示例7: olc_get_address_format_id

function olc_get_address_format_id($country_id)
{
    $address_format_query = olc_db_query("select address_format_id as format_id from " . TABLE_COUNTRIES . " where countries_id = '" . $country_id . APOS);
    if (olc_db_num_rows($address_format_query)) {
        $address_format = olc_db_fetch_array($address_format_query);
        return $address_format['format_id'];
    } else {
        return '1';
    }
}
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:10,代码来源:125.php


示例8: olc_get_zone_name

function olc_get_zone_name($country_id, $zone_id, $default_zone = '')
{
    $zone_query = olc_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . $country_id . "' and zone_id = '" . $zone_id . APOS);
    if (olc_db_num_rows($zone_query)) {
        $zone = olc_db_fetch_array($zone_query);
        return $zone['zone_name'];
    } else {
        return $default_zone;
    }
}
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:10,代码来源:181.php


示例9: olc_get_languages_directory

function olc_get_languages_directory($code)
{
    $language_query = olc_db_query("select languages_id, directory from " . TABLE_LANGUAGES . " where code = '" . $code . APOS);
    if (olc_db_num_rows($language_query)) {
        $lang = olc_db_fetch_array($language_query);
        $_SESSION['languages_id'] = $lang['languages_id'];
        return $lang['directory'];
    } else {
        return false;
    }
}
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:11,代码来源:languages.php


示例10: olc_activate_banners

function olc_activate_banners()
{
    $banners_query = olc_db_query("select banners_id, date_scheduled from " . TABLE_BANNERS . " where date_scheduled != ''");
    if (olc_db_num_rows($banners_query)) {
        while ($banners = olc_db_fetch_array($banners_query)) {
            if (date('Y-m-d H:i:s') >= $banners['date_scheduled']) {
                olc_set_banner_status($banners['banners_id'], '1');
            }
        }
    }
}
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:11,代码来源:olc_activate_banners.inc.php


示例11: olc_get_affiliate_tax_rate

function olc_get_affiliate_tax_rate($class_id, $country_id, $zone_id)
{
    $tax_query = olc_db_query("select SUM(tax_rate) as tax_rate from " . TABLE_TAX_RATES . " tr left join " . TABLE_ZONES_TO_GEO_ZONES . " za ON tr.tax_zone_id = za.geo_zone_id left join " . TABLE_GEO_ZONES . " tz ON tz.geo_zone_id = tr.tax_zone_id\n    \tWHERE (za.zone_country_id IS NULL OR za.zone_country_id = '0' OR za.zone_country_id = '" . $country_id . "') AND (za.zone_id IS NULL OR za.zone_id = '0' OR za.zone_id = '" . $zone_id . "') AND tr.tax_class_id = '" . $class_id . "' GROUP BY tr.tax_priority");
    if (olc_db_num_rows($tax_query)) {
        $tax_multiplier = 0;
        while ($tax = olc_db_fetch_array($tax_query)) {
            $tax_multiplier += $tax['tax_rate'];
        }
        return $tax_multiplier;
    } else {
        return 0;
    }
}
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:13,代码来源:affiliate_functions.php


示例12: olc_get_manufacturers

function olc_get_manufacturers($manufacturers_array = '')
{
    $manufacturers_query = olc_db_query("select manufacturers_id, manufacturers_name from " . TABLE_MANUFACTURERS . " order by manufacturers_name");
    if (olc_db_num_rows($manufacturers_query)) {
        if (!is_array($manufacturers_array)) {
            $manufacturers_array = array();
        }
        $manufacturers_array[] = array('id' => EMPTY_STRING, 'text' => TEXT_ALL_MANUFACTURERS);
        while ($manufacturers = olc_db_fetch_array($manufacturers_query)) {
            $manufacturers_array[] = array('id' => $manufacturers['manufacturers_id'], 'text' => $manufacturers['manufacturers_name']);
        }
    }
    return $manufacturers_array;
}
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:14,代码来源:olc_get_manufacturers.inc.php


示例13: olc_get_tax_description

function olc_get_tax_description($class_id, $country_id, $zone_id)
{
    $tax_query = olc_db_query("select tax_description from " . TABLE_TAX_RATES . " tr left join " . TABLE_ZONES_TO_GEO_ZONES . " za on (tr.tax_zone_id = za.geo_zone_id) left join " . TABLE_GEO_ZONES . " tz on (tz.geo_zone_id = tr.tax_zone_id) where (za.zone_country_id is null or za.zone_country_id = '0' or za.zone_country_id = '" . $country_id . "') and (za.zone_id is null or za.zone_id = '0' or za.zone_id = '" . $zone_id . "') and tr.tax_class_id = '" . $class_id . "' order by tr.tax_priority");
    if (olc_db_num_rows($tax_query)) {
        $tax_description = '';
        while ($tax = olc_db_fetch_array($tax_query)) {
            $tax_description .= $tax['tax_description'] . ' + ';
        }
        $tax_description = substr($tax_description, 0, -3);
        return $tax_description;
    } else {
        return TEXT_UNKNOWN_TAX_RATE;
    }
}
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:14,代码来源:olc_get_tax_description.inc.php


示例14: olc_findTitle

function olc_findTitle($current_pid, $languageFilter)
{
    $query = "SELECT * FROM " . TABLE_PRODUCTS_DESCRIPTION . " where language_id = '" . SESSION_LANGUAGE_ID . "' AND products_id = '" . $current_pid . APOS;
    $result = olc_db_query($query);
    $matches = olc_db_num_rows($result);
    if ($matches) {
        while ($line = olc_db_fetch_array($result, olc_db_ASSOC)) {
            $productName = $line['products_name'];
        }
        return $productName;
    } else {
        return "Something isn't right....";
    }
}
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:14,代码来源:olc_findTitle.inc.php


示例15: olc_gv_account_update

function olc_gv_account_update($customer_id, $gv_id)
{
    $customer_gv_query = olc_db_query("select amount from " . TABLE_COUPON_GV_CUSTOMER . " where customer_id = '" . $customer_id . APOS);
    $coupon_gv_query = olc_db_query("select coupon_amount from " . TABLE_COUPONS . " where coupon_id = '" . $gv_id . APOS);
    $coupon_gv = olc_db_fetch_array($coupon_gv_query);
    if (olc_db_num_rows($customer_gv_query) > 0) {
        $customer_gv = olc_db_fetch_array($customer_gv_query);
        $new_gv_amount = $customer_gv['amount'] + $coupon_gv['coupon_amount'];
        // new code bugfix
        $gv_query = olc_db_query(SQL_UPDATE . TABLE_COUPON_GV_CUSTOMER . " set amount = '" . $new_gv_amount . "' where customer_id = '" . $customer_id . APOS);
        // original code $gv_query = olc_db_query(SQL_UPDATE . TABLE_COUPON_GV_CUSTOMER . " set amount = '" . $new_gv_amount . APOS);
    } else {
        $gv_query = olc_db_query(INSERT_INTO . TABLE_COUPON_GV_CUSTOMER . " (customer_id, amount) values ('" . $customer_id . "', '" . $coupon_gv['coupon_amount'] . "')");
    }
}
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:15,代码来源:383.php


示例16: checkAttribute

function checkAttribute($current_value_id, $current_pid, $current_product_option_id)
{
    global $attribute_value_price, $sortorder, $attribute_value_weight, $attribute_value_weight_prefix, $attribute_value_prefix, $attribute_value_model, $attribute_value_stock, $posCheck, $negCheck, $posCheck_weight, $negCheck_weight;
    $query = "SELECT * FROM " . TABLE_PRODUCTS_ATTRIBUTES . " where options_values_id = '" . $current_value_id . "' AND products_id = ' " . $current_pid . "' AND options_id = '" . $current_product_option_id . APOS;
    $result = olc_db_query($query);
    $isFound = olc_db_num_rows($result);
    if ($isFound) {
        while ($line = olc_db_fetch_array($result, olc_db_ASSOC)) {
            $attribute_value_price = $line['options_values_price'];
            $sortorder = $line['sortorder'];
            $attribute_value_prefix = $line['price_prefix'];
            $attribute_value_weight_prefix = $line['weight_prefix'];
            $attribute_value_model = $line['attributes_model'];
            $attribute_value_stock = $line['attributes_stock'];
            $attribute_value_weight = $line['options_values_weight'];
            if ($attribute_value_prefix == '+') {
                $posCheck = ' SELECTED';
                $negCheck = '';
            } else {
                $posCheck = '';
                $negCheck = ' SELECTED';
            }
            if ($attribute_value_weight_prefix == '+') {
                $posCheck_weight = ' SELECTED';
                $negCheck_weight = '';
            } else {
                $posCheck_weight = '';
                $negCheck_weight = ' SELECTED';
            }
        }
        return true;
    } else {
        $attribute_value_price = '';
        $sortorder = '';
        $attribute_value_weight = '';
        $attribute_value_prefix = '';
        $attribute_value_weight_prefix = '';
        $attribute_value_model = '';
        $attribute_value_stock = '';
        $posCheck = '';
        $negCheck = '';
        $posCheck_weight = '';
        $negCheck_weight = '';
        return false;
    }
}
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:46,代码来源:new_attributes_functions.php


示例17: olc_expire_banners

function olc_expire_banners()
{
    $banners_query = olc_db_query("select b.banners_id, b.expires_date, b.expires_impressions, sum(bh.banners_shown) as banners_shown from " . TABLE_BANNERS . " b, " . TABLE_BANNERS_HISTORY . " bh where b.status = '1' and b.banners_id = bh.banners_id group by b.banners_id");
    if (olc_db_num_rows($banners_query)) {
        while ($banners = olc_db_fetch_array($banners_query)) {
            if (olc_not_null($banners['expires_date'])) {
                if (date('Y-m-d H:i:s') >= $banners['expires_date']) {
                    olc_set_banner_status($banners['banners_id'], '0');
                }
            } elseif (olc_not_null($banners['expires_impressions'])) {
                if ($banners['banners_shown'] >= $banners['expires_impressions']) {
                    olc_set_banner_status($banners['banners_id'], '0');
                }
            }
        }
    }
}
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:17,代码来源:316.php


示例18: paypal_remove_order

function paypal_remove_order($order_id)
{
    include_once PAYPAL_IPN_DIR . 'inc.php';
    $ipn_query = olc_db_query("select payment_id from " . TABLE_ORDERS . " where orders_id = '" . (int) $order_id . APOS);
    if (olc_db_num_rows($ipn_query)) {
        // this is a ipn order (PayPal or StormPay)
        $ipn_order = olc_db_fetch_array($ipn_query);
        $paypal_id = $ipn_order['payment_id'];
        $txn_query = olc_db_query("select txn_id from " . TABLE_PAYPAL . " where paypal_id ='" . (int) $paypal_id . APOS);
        $txn = olc_db_fetch_array($txn_query);
        olc_db_query(DELETE_FROM . TABLE_PAYPAL . " where paypal_id = '" . (int) $paypal_id . APOS);
        olc_db_query(DELETE_FROM . TABLE_PAYPAL . " where parent_txn_id = '" . olc_db_input($txn['txn_id']) . APOS);
        if (defined('TABLE_PAYPAL_AUCTION')) {
            olc_db_query(DELETE_FROM . TABLE_PAYPAL_AUCTION . " where paypal_id = '" . (int) $paypal_id . APOS);
        }
    }
    olc_db_query(DELETE_FROM . TABLE_ORDERS_SESSION_INFO . " where orders_id = '" . (int) $order_id . APOS);
}
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:18,代码来源:general.func.php


示例19: olc_get_product_path

function olc_get_product_path($products_id)
{
    $cPath = EMPTY_STRING;
    $category_query = olc_db_query("\n\tselect\n\tp2c.categories_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c\n\twhere\n\tp.products_id = '" . (int) $products_id . "' and\n\tp.products_status = '1' and\n\tp.products_id = p2c.products_id\n\tlimit 1");
    if (olc_db_num_rows($category_query)) {
        $category = olc_db_fetch_array($category_query);
        $categories_id = $category['categories_id'];
        $categories = array();
        olc_get_parent_categories($categories, $categories_id);
        $categories = array_reverse($categories);
        $cPath = implode(UNDERSCORE, $categories);
        if ($cPath) {
            $cPath .= UNDERSCORE;
        }
        $cPath .= $categories_id;
    }
    return $cPath;
}
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:18,代码来源:153.php


示例20: olc_get_tax_rate_export

function olc_get_tax_rate_export($class_id, $country_id = -1, $zone_id = -1)
{
    global $currency;
    // calculate currencies
    if ($country_id == -1 && $zone_id == -1) {
        $country_id = STORE_COUNTRY;
        $zone_id = STORE_ZONE;
    }
    $tax_query = olc_db_query("select sum(tax_rate) as tax_rate from " . TABLE_TAX_RATES . " tr left join " . TABLE_ZONES_TO_GEO_ZONES . " za on (tr.tax_zone_id = za.geo_zone_id) left join " . TABLE_GEO_ZONES . " tz on (tz.geo_zone_id = tr.tax_zone_id) where (za.zone_country_id is null or za.zone_country_id = '0' or za.zone_country_id = '" . $country_id . "') and (za.zone_id is null or za.zone_id = '0' or za.zone_id = '" . $zone_id . "') and tr.tax_class_id = '" . $class_id . "' group by tr.tax_priority");
    if (olc_db_num_rows($tax_query)) {
        $tax_multiplier = 1.0;
        while ($tax = olc_db_fetch_array($tax_query)) {
            $tax_multiplier *= 1.0 + $tax['tax_rate'] / 100;
        }
        return ($tax_multiplier - 1.0) * 100;
    } else {
        return 0;
    }
}
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:19,代码来源:export_functions.php



注:本文中的olc_db_num_rows函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP olc_db_perform函数代码示例发布时间:2022-05-15
下一篇:
PHP olc_db_input函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap