本文整理汇总了PHP中S::newMemberID方法的典型用法代码示例。如果您正苦于以下问题:PHP S::newMemberID方法的具体用法?PHP S::newMemberID怎么用?PHP S::newMemberID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类S
的用法示例。
在下文中一共展示了S::newMemberID方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: save
public function save($q)
{
$lead_id = Std::parseInt($q->get("lead_id"));
$user = S::$user;
$log_id = false;
if ($log_id = $this->saveLog($q, null)) {
$cTable = "custom_" . Std::string($q->get("entry_list_id"));
haxe_Log::trace(_hx_string_or_null($cTable) . " log_id:" . Std::string($log_id), _hx_anonymous(array("fileName" => "QC.hx", "lineNumber" => 162, "className" => "model.QC", "methodName" => "save")));
$primary_id = S::$my->real_escape_string($q->get("primary_id"));
$sql = new StringBuf();
$sql->add("UPDATE " . _hx_string_or_null($cTable) . " SET ");
$cFields = S::tableFields("" . _hx_string_or_null($cTable), null);
haxe_Log::trace("" . _hx_string_or_null($cTable) . " fields:" . _hx_string_or_null($cFields->toString()), _hx_anonymous(array("fileName" => "QC.hx", "lineNumber" => 177, "className" => "model.QC", "methodName" => "save")));
$cFields->remove($primary_id);
$bindTypes = "";
$values2bind = null;
$i = 0;
$dbFieldTypes = php_Lib::hashOfAssociativeArray(php_Lib::associativeArrayOfObject(S::$conf->get("dbFieldTypes")));
$sets = new _hx_array(array());
$_g = 0;
while ($_g < $cFields->length) {
$c = $cFields[$_g];
++$_g;
$val = $q->get($c);
if ($val !== null) {
if (Std::is($val, _hx_qtype("String"))) {
$values2bind[$i++] = $val;
} else {
$values2bind[$i++] = $val[0];
}
$type = $dbFieldTypes->get($c);
if (Util::any2bool($type)) {
$bindTypes .= _hx_string_or_null($type);
} else {
$bindTypes .= "s";
}
$sets->push(_hx_string_or_null($c) . "=?");
unset($type);
}
unset($val, $c);
}
$sql->add($sets->join(","));
$sql->add(" WHERE lead_id=" . _hx_string_rec($lead_id, ""));
$stmt = S::$my->stmt_init();
haxe_Log::trace($sql->b, _hx_anonymous(array("fileName" => "QC.hx", "lineNumber" => 199, "className" => "model.QC", "methodName" => "save")));
$success = $stmt->prepare($sql->b);
if (!$success) {
haxe_Log::trace($stmt->error, _hx_anonymous(array("fileName" => "QC.hx", "lineNumber" => 203, "className" => "model.QC", "methodName" => "save")));
return false;
}
$success = myBindParam($stmt, $values2bind, $bindTypes);
haxe_Log::trace("success:" . Std::string($success), _hx_anonymous(array("fileName" => "QC.hx", "lineNumber" => 207, "className" => "model.QC", "methodName" => "save")));
if ($success) {
$success = $stmt->execute();
if (!$success) {
haxe_Log::trace($stmt->error, _hx_anonymous(array("fileName" => "QC.hx", "lineNumber" => 213, "className" => "model.QC", "methodName" => "save")));
return false;
}
$sql = new StringBuf();
$uFields = model_QC::$vicdial_list_fields;
$uFields->remove($primary_id);
$bindTypes = "";
$values2bind = null;
$i = 0;
$sql->add("UPDATE vicidial_list SET ");
$sets = new _hx_array(array());
$_g1 = 0;
while ($_g1 < $uFields->length) {
$c1 = $uFields[$_g1];
++$_g1;
$val1 = $q->get($c1);
if ($val1 !== null) {
if (Std::is($val1, _hx_qtype("String"))) {
$values2bind[$i++] = $val1;
} else {
$values2bind[$i++] = $val1[0];
}
$type1 = $dbFieldTypes->get($c1);
if (Util::any2bool($type1)) {
$bindTypes .= _hx_string_or_null($type1);
} else {
$bindTypes .= "s";
}
$sets->push(_hx_string_or_null($c1) . "=?");
unset($type1);
}
unset($val1, $c1);
}
$values2bind[$i++] = S::$user;
$bindTypes .= "s";
$sets->push("security_phrase=?");
$values2bind[$i++] = "XX";
$bindTypes .= "s";
$sets->push("state=?");
if (_hx_equal($q->get("status"), "QCOK") || _hx_equal($q->get("status"), "QCBAD")) {
$list_id = 10000;
if (_hx_equal($q->get("status"), "QCOK")) {
$mID = Std::parseInt($q->get("vendor_lead_code"));
if ($mID === null) {
$mID = S::newMemberID();
//.........这里部分代码省略.........
示例2: save
//.........这里部分代码省略.........
$sql->add(" WHERE lead_id=" . _hx_string_rec($lead_id, ""));
$stmt = S::$my->stmt_init();
haxe_Log::trace($sql->b, _hx_anonymous(array("fileName" => "QC.hx", "lineNumber" => 147, "className" => "model.QC", "methodName" => "save")));
$success = $stmt->prepare($sql->b);
if (!$success) {
haxe_Log::trace($stmt->error, _hx_anonymous(array("fileName" => "QC.hx", "lineNumber" => 151, "className" => "model.QC", "methodName" => "save")));
return false;
}
$success = myBindParam($stmt, $values2bind, $bindTypes);
haxe_Log::trace("success:" . Std::string($success), _hx_anonymous(array("fileName" => "QC.hx", "lineNumber" => 155, "className" => "model.QC", "methodName" => "save")));
if ($success) {
$success = $stmt->execute();
if (!$success) {
haxe_Log::trace($stmt->error, _hx_anonymous(array("fileName" => "QC.hx", "lineNumber" => 161, "className" => "model.QC", "methodName" => "save")));
return false;
}
$sql = new StringBuf();
$uFields = model_QC::$vicdial_list_fields;
$uFields->remove($primary_id);
$bindTypes = "";
$values2bind = null;
$i = 0;
$sql->add("UPDATE vicidial_list SET ");
$sets = new _hx_array(array());
$_g1 = 0;
while ($_g1 < $uFields->length) {
$c1 = $uFields[$_g1];
++$_g1;
$val1 = $q->get($c1);
if ($val1 !== null) {
if (Std::is($val1, _hx_qtype("String"))) {
$values2bind[$i++] = $val1;
} else {
$values2bind[$i++] = $val1[0];
}
$type1 = $dbFieldTypes->get($c1);
if (Util::any2bool($type1)) {
$bindTypes .= _hx_string_or_null($type1);
} else {
$bindTypes .= "s";
}
$sets->push(_hx_string_or_null($c1) . "=?");
unset($type1);
}
unset($val1, $c1);
}
$values2bind[$i++] = S::$user;
$bindTypes .= "s";
$sets->push("security_phrase=?");
if (_hx_equal($q->get("status"), "MITGL")) {
$list_id = 10000;
$mID = Std::parseInt($q->get("vendor_lead_code"));
if ($mID === null) {
$mID = S::newMemberID();
$values2bind[$i++] = $mID;
$bindTypes .= "s";
$sets->push("vendor_lead_code=?");
}
$entry_list_id = $q->get("entry_list_id");
$values2bind[$i++] = $q->get("status");
$bindTypes .= "s";
$sets->push("`status`=?");
$values2bind[$i++] = $list_id;
$bindTypes .= "s";
$sets->push("list_id=?");
$values2bind[$i++] = $entry_list_id;
$bindTypes .= "s";
$sets->push("entry_list_id=?");
$values2bind[$i++] = $q->get("user");
$bindTypes .= "s";
$sets->push("owner=?");
}
$sql->add($sets->join(","));
$sql->add(" WHERE lead_id=" . _hx_string_rec($lead_id, ""));
$stmt1 = S::$my->stmt_init();
haxe_Log::trace($sql->b, _hx_anonymous(array("fileName" => "QC.hx", "lineNumber" => 216, "className" => "model.QC", "methodName" => "save")));
$success1 = $stmt1->prepare($sql->b);
if (!$success1) {
haxe_Log::trace($stmt1->error, _hx_anonymous(array("fileName" => "QC.hx", "lineNumber" => 220, "className" => "model.QC", "methodName" => "save")));
return false;
}
$success1 = myBindParam($stmt1, $values2bind, $bindTypes);
haxe_Log::trace("success:" . Std::string($success1), _hx_anonymous(array("fileName" => "QC.hx", "lineNumber" => 224, "className" => "model.QC", "methodName" => "save")));
if ($success1) {
$success1 = $stmt1->execute();
if (!$success1) {
haxe_Log::trace($stmt1->error, _hx_anonymous(array("fileName" => "QC.hx", "lineNumber" => 230, "className" => "model.QC", "methodName" => "save")));
return false;
}
return true;
}
return false;
}
} else {
haxe_Log::trace("oops", _hx_anonymous(array("fileName" => "QC.hx", "lineNumber" => 240, "className" => "model.QC", "methodName" => "save")));
}
}
}
return false;
}