当前位置: 首页>>代码示例>>PHP>>正文


PHP ParseQuery::notEqualTo方法代码示例

本文整理汇总了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.');
 }
开发者ID:rvdavid,项目名称:parse-php-sdk,代码行数:19,代码来源:ParseQueryTest.php

示例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");
开发者ID:khangaikh,项目名称:eloan-tsagaandens,代码行数:31,代码来源:index.php

示例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();
     }
 }
开发者ID:nidalb,项目名称:baas,代码行数:12,代码来源:ExampleTest.php

示例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');
     }
 }
开发者ID:Lawrence94,项目名称:sme4me,代码行数:34,代码来源:Managers.php


注:本文中的Parse\ParseQuery::notEqualTo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。