本文整理汇总了PHP中Parse\ParseQuery::notEqualTo方法的典型用法代码示例。如果您正苦于以下问题:PHP ParseQuery::notEqualTo方法的具体用法?PHP ParseQuery::notEqualTo怎么用?PHP ParseQuery::notEqualTo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Parse\ParseQuery
的用法示例。
在下文中一共展示了ParseQuery::notEqualTo方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testNotEqualToObject
public function testNotEqualToObject()
{
Helper::clearClass("Container");
Helper::clearClass("Item");
$items = [];
$this->saveObjects(2, function ($i) use(&$items) {
$items[] = ParseObject::create("Item");
return $items[$i];
});
$this->saveObjects(2, function ($i) use($items) {
$container = ParseObject::create("Container");
$container->set("item", $items[$i]);
return $container;
});
$query = new ParseQuery("Container");
$query->notEqualTo("item", $items[0]);
$result = $query->find();
$this->assertEquals(1, count($result), 'Did not return the correct object.');
}
示例2: ParseQuery
$cusId = $_GET["loanId"];
$query = new ParseQuery("customer");
$query->equalTo("objectId", $cusId);
$customer = $query->first();
$register = $customer->get("register_no");
$title = $register;
$query = new ParseQuery("loan");
$query->equalTo("customer", $customer);
$loans = $query->find();
//render a template
echo $template->render(array('title' => $title, 'loans' => $loans));
} else {
if (empty($_GET["cid"])) {
$template = $twig->loadTemplate('dashboard.html');
$query = new ParseQuery("loan");
$query->notEqualTo("status", 0);
$results = $query->find();
//render a template
echo $template->render(array('title' => 'Самбар', 'loans' => $results));
} else {
if ($_GET["cid"] == 2) {
$query = new ParseQuery("loan_types");
$query->descending("createdAt");
$results = $query->find();
$template = $twig->loadTemplate('add_loan.html');
//render a template
echo $template->render(array('title' => 'Шинэ зээл', 'loan_types' => $results));
} else {
if ($_GET["cid"] == 3) {
$template = $twig->loadTemplate('setting.html');
$query = new ParseQuery("loss");
示例3: notEqualToQuery
public function notEqualToQuery()
{
$query = new ParseQuery("Test");
try {
ParseClient::$THROW_RESPONSE = true;
$query->notEqualTo("name", $this->objects->first()->name);
$results = $query->find();
} catch (\Exception $ex) {
$msg = json_decode($ex->getMessage(), true);
return $msg ? $msg : $ex->getMessage();
}
}
示例4: edit_header
public function edit_header($displayData, $userId)
{
//getting the currently logged in admin
$currentUser = ParseUser::getCurrentUser();
$firstName = '';
$lastName = '';
$objectId = '';
$objectName = '';
$url = 'company/managers/editManager/' . $userId;
$cssClass = 'active';
$cssClass1 = '""';
$cssClass2 = '""';
$cssClass3 = '""';
if ($currentUser) {
// do stuff with the user
$roleCheck = $currentUser->get("role");
$roleCheck->fetch();
$role = $roleCheck->get("name");
//
$query = new ParseQuery("_Role");
$query->notEqualTo("name", $role);
$query->equalTo("users", $currentUser);
$result = $query->find();
$role_info = [];
for ($i = 0; $i < count($result); $i++) {
$object = $result[$i];
$role_info[$object->getObjectId()] = $object->get('name');
}
return array('redirect' => $url, 'active1' => $cssClass, 'active2' => $cssClass1, 'active4' => $cssClass1, 'active5' => $cssClass1, 'active' => $cssClass2, 'role' => $role, 'displayData' => $displayData, 'permission' => $role_info, 'active3' => $cssClass3, 'modaluserEditQuery' => $this->compeditquery->doAdminEditQuery($userId));
} else {
// show the signup or login page
redirect('company/login', 'refresh');
}
}