当前位置: 首页>>代码示例>>PHP>>正文


PHP product::select方法代码示例

本文整理汇总了PHP中product::select方法的典型用法代码示例。如果您正苦于以下问题:PHP product::select方法的具体用法?PHP product::select怎么用?PHP product::select使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在product的用法示例。


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

示例1: product

 * This file is part of the allocPSA application <info@cyber.com.au>.
 * 
 * allocPSA is free software: you can redistribute it and/or modify it
 * under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or (at
 * your option) any later version.
 * 
 * allocPSA is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
 * License for more details.
 * 
 * You should have received a copy of the GNU Affero General Public License
 * along with allocPSA. If not, see <http://www.gnu.org/licenses/>.
*/
define("NO_REDIRECT", 1);
require_once "../alloc.php";
$db = new db_alloc();
$product = $_GET["product"];
$quantity = $_GET["quantity"];
$p = new product();
$p->set_id($product);
$p->select();
$p->set_tpl_values();
// Probably not valid XML, but jQuery will parse it.
echo "<data>\n";
echo "<price>" . page::money($TPL["sellPriceCurrencyTypeID"], $TPL["sellPrice"] * $quantity, "%m") . "</price>\n";
echo "<priceCurrency>" . $TPL["sellPriceCurrencyTypeID"] . "</priceCurrency>\n";
echo "<priceTax>" . ($TPL["sellPriceIncTax"] ? "1" : "") . "</priceTax>\n";
echo "<description>" . $TPL["description"] . "</description>\n";
echo "</data>\n";
开发者ID:cjbayliss,项目名称:alloc,代码行数:31,代码来源:updateCostPrice.php

示例2: TraerModelos

 public function TraerModelos()
 {
     $products = product::select('id', 'modelo')->where('modelo', '<>', 'null')->groupBy('modelo')->get();
     return $products;
 }
开发者ID:softwareDiaz,项目名称:prueba,代码行数:5,代码来源:ProductRepo.php

示例3: tf_list

}
function tf_list($selected = "", $remove_these = array())
{
    global $tflist;
    $temp = $tflist;
    foreach ($remove_these as $dud) {
        unset($temp[$dud]);
    }
    echo page::select_options($temp, $selected);
    return;
}
$productID = $_GET["productID"] or $productID = $_POST["productID"];
$product = new product();
if ($productID) {
    $product->set_id($productID);
    $product->select();
}
$tf = new tf();
$tflist = $tf->get_assoc_array("tfID", "tfName");
$extra_options = array("-1" => "META: Project TF", "-2" => "META: Salesperson TF", config::get_config_item("mainTfID") => "Main Finance TF (" . tf::get_name(config::get_config_item("mainTfID")) . ")", config::get_config_item("outTfID") => "Outgoing Funds TF (" . tf::get_name(config::get_config_item("outTfID")) . ")", config::get_config_item("inTfID") => "Incoming Funds TF (" . tf::get_name(config::get_config_item("inTfID")) . ")");
// Prepend the META options to the tflist.
$tflist = $extra_options + $tflist;
$TPL["companyTF"] = $tflist[config::get_config_item("mainTfID")];
$TPL["taxTF"] = $tflist[config::get_config_item("taxTfID")];
$taxRate = config::get_config_item("taxPercent") / 100.0;
$TPL["taxRate"] = $taxRate;
if ($_POST["save"]) {
    $product->read_globals();
    $product->set_value("productActive", isset($_POST["productActive"]) ? 1 : 0);
    !$product->get_value("productName") and alloc_error("Please enter a Product Name.");
    !$product->get_value("sellPrice") and alloc_error("Please enter a Sell Price.");
开发者ID:cjbayliss,项目名称:alloc,代码行数:31,代码来源:product.php


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