本文整理汇总了PHP中Connect::select方法的典型用法代码示例。如果您正苦于以下问题:PHP Connect::select方法的具体用法?PHP Connect::select怎么用?PHP Connect::select使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Connect
的用法示例。
在下文中一共展示了Connect::select方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getMessageTopParent
public function getMessageTopParent($id)
{
$rid = $id;
if ($rid > 0) {
while ($rid > 0) {
$parent = $rid;
$res = $this->connect->select("rid", $this->tableName, "id = :id", [':id' => $rid]);
$rid = $res[0]['rid'];
}
}
return $parent;
}
示例2: setAllText
private function setAllText()
{
$result = Connect::select("text", "");
foreach ($result as $val) {
App::$text[$val['key_t']] = $val['content'];
}
}
示例3: getUserStatus
public function getUserStatus($mid)
{
if ($mid) {
$users = array();
$userlist = $this->connect->select('uid, status', $this->tableName, 'mid = ' . $mid);
foreach ($userlist as $u => $user) {
$users[$user['uid']] = $user['status'];
}
return $users;
} else {
return false;
}
}
示例4: login
function login()
{
require_once ROOT_REQUEST . "loginRequest.php";
$req = new loginRequest();
if ($req->_error()) {
$user = Connect::select("user", " WHERE email='" . $req->_req('email') . "' and password='" . md5($req->_req('password')) . "' ");
if (count($user) > 0) {
$_SESSION['email'] = $req->_req('email');
$_SESSION['password'] = md5($req->_req('password'));
echo json_encode(['status' => true]);
exit(0);
}
}
echo json_encode(['status' => false]);
}
示例5: getChildren
/**
* @param $id
* @return mixed
*/
public function getChildren($id)
{
$message = $this->connect->select("*", $this->tableName, "status < 2 AND rid = :rid ", [':rid' => $id]);
return $message;
}
示例6: getById
public function getById($id)
{
$project = $this->connect->select("*", $this->tableName, "id = :id", [':id' => 1]);
return $project;
}
示例7: getMimeType
public function getMimeType($id)
{
$mimetype = $this->connect->select("mimetype", "oc_mimetypes", "id = :id", [':id' => $id]);
return $mimetype;
}
示例8: getById
public function getById($id)
{
$user = $this->connect->select("*", $this->tableName, "uid = :id", [':id' => $id]);
return $user;
}
示例9: get
/**
* Retrieve all date of links project-tasks
* @return array|null
*/
public function get()
{
return $this->connect->select('*', $this->tableName);
}
示例10: get
/**
* Retrieve all date of links project-tasks
*
* @return array|null
*/
public function get()
{
return $this->connect->select('*', $this->tableName, 'deleted != 1');
}