本文整理汇总了PHP中Connect::buildQuery方法的典型用法代码示例。如果您正苦于以下问题:PHP Connect::buildQuery方法的具体用法?PHP Connect::buildQuery怎么用?PHP Connect::buildQuery使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Connect
的用法示例。
在下文中一共展示了Connect::buildQuery方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: erase
/**
* Ejecuta un procedimiento almacenado de borrar, enviando los atributos necesarios del objeto
* @return void
* @author Johnny Alexander Salazar
* @version 0.1
*/
public function erase()
{
$query = parent::buildQuery("eliminaRol", array($this->id));
parent::verify($query);
}
示例2: serialize
$currentarray = array_values($currentarray);
if (count($currentarray) == 0) {
$current = NULL;
} else {
$current = serialize($currentarray);
}
//Update Notif Comp
$notifcomp = explode(";", $row["notification_raw"]);
for ($j = 0; $j < count($removestub); $j++) {
unset($notifcomp[$removestub[$j] - $j]);
}
if (count($notifcomp) == 0) {
$notifstr = NULL;
} else {
$notifstr = implode(";", $notifcomp);
}
//Decrement Notification Count
$unval = intval($currentrow["numberunseen"]) - $decrementcount;
if ($unval < 0) {
$unval = 0;
}
}
$build = strval($connection->buildQuery(1, 1, $column)) . ' = :current, `notification_raw` = :notifstr, `numberunseen` = :unval WHERE id = :profid';
$postsql = $connectinfo->prepare($build);
$postsql->execute(array(':current' => $current, ':notifstr' => $notifstr, ':unval' => $unval, ':profid' => $profid));
} else {
echo "Error - authorization mismatch";
}
} else {
echo 'Error - invalid supplied post data (not enough info?)';
}
示例3: signin
/**
* Ejecuta una consulta login con los parametros usuario y contraseña
*
* @return void
* @author Johnny Alexander Salazar
* @version 0.1
*/
public function signin()
{
$query = parent::buildQuery("login", array((string) $this->user, (string) md5($this->password)));
//$query = "select login('" . $this->user . "','" . md5($this->password) . "', 'result'); FETCH ALL IN result";
parent::verifyLogin($query);
}
示例4: unserialize
$currentarray = unserialize($current);
$decrementcount = 0;
if (is_array($currentarray)) {
if (isset($currentarray['isread'])) {
if ($currentarray['data'] == $data) {
$currentarray["isread"] = 1;
$decrementcount++;
}
} else {
for ($i = 0; $i < count($currentarray); $i++) {
$loop = $currentarray[$i];
if ($loop['data'] == $data) {
$loop["isread"] = 1;
$currentarray[$i] = $loop;
$decrementcount++;
}
}
}
}
$current = serialize($currentarray);
}
$build = strval($connection->buildQuery(1, 1, $column)) . ' = :current WHERE id = :profid';
$postsql = $connectinfo->prepare($build);
$postsql->execute(array(':current' => $current, ":profid" => $profid));
$connection->DecrementNotificationCount($connectinfo, $profid, $decrementcount);
} else {
echo "Error - authorization mismatch";
}
} else {
echo 'Error - invalid supplied post data (not enough info?)';
}