本文整理汇总了PHP中Vendor::free方法的典型用法代码示例。如果您正苦于以下问题:PHP Vendor::free方法的具体用法?PHP Vendor::free怎么用?PHP Vendor::free使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Vendor
的用法示例。
在下文中一共展示了Vendor::free方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: map_products_vendor
public function map_products_vendor($vendor_name)
{
$security_where = $_SESSION["do_crm_action_permission"]->get_user_where_condition('vendor', 11);
$qry = "select * from `vendor` where `vendor_name` = ? " . $security_where;
$stmt = $this->getDbConnection()->executeQuery($qry, array($vendor_name));
if ($stmt->rowCount() > 0) {
$data = $stmt->fetch();
$idvendor = $data["idvendor"];
return $idvendor;
} else {
if (strlen($vendor_name) > 0) {
$do_vendor = new Vendor();
$data = array("vendor_name" => CommonUtils::purify_input($vendor_name), "iduser" => $_SESSION["do_user"]->iduser, "added_on" => date("Y-m-d H:i:s"));
$do_vendor->insert("vendor", $data);
$idvendor = $do_vendor->getInsertId();
$do_vendor->insert("vendor_address", array("idvendor" => $idvendor));
$do_vendor->insert("vendor_custom_fld", array("idvendor" => $idvendor));
$do_vendor->free();
$do_data_history = new DataHistory();
$do_data_history->add_history($idvendor, 11, 'add');
$do_data_history->free();
return $idvendor;
}
}
}