當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ParseQuery::equalto方法代碼示例

本文整理匯總了PHP中Parse\ParseQuery::equalto方法的典型用法代碼示例。如果您正苦於以下問題:PHP ParseQuery::equalto方法的具體用法?PHP ParseQuery::equalto怎麽用?PHP ParseQuery::equalto使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Parse\ParseQuery的用法示例。


在下文中一共展示了ParseQuery::equalto方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: header

<?php

session_start();
if (!isset($_SESSION['contact_no'])) {
    header('location:homepage.php');
}
require 'vendor/autoload.php';
use Parse\ParseClient;
use Parse\ParseObject;
use Parse\ParseQuery;
try {
    ParseClient::initialize('ilAdpSlcSs2PYQzZtC9k549MMrEq6GWBEkgPL052', '2ptwsyysoXq6KZ055Rz6qgAVLc6kGqq4geBcYGrV', '5o87OulNuELCkqYB3cju1ETOcLllLqB5K13F12Pg');
    $query = new ParseQuery("MerchantBuy");
    $query->equalto('objectId', $_SESSION["id"]);
    $object = $query->first();
    echo $object->get("Product");
    $object->set("Product", $_POST['product']);
    $object->set("cost", (int) $_POST['cost']);
    $object->set("max_amount", (int) $_POST['amount']);
    $object->set("Location", $_POST['location']);
    $object->save();
    //echo "1";
    header('location:merchantproductdata.php');
} catch (Exception $e) {
    header('location:merchantproductdata.php');
}
開發者ID:lalitc375,項目名稱:Farmer_Merchant,代碼行數:26,代碼來源:merchantupdatesingledata.php

示例2: header

</div>
</div><br><br><br>
<center><h3>Update Product</h3></center>
<br><br><br><?php 
session_start();
if (!isset($_SESSION['contact_no'])) {
    header('location:homepage.php');
}
require 'vendor/autoload.php';
use Parse\ParseClient;
use Parse\ParseObject;
use Parse\ParseQuery;
try {
    ParseClient::initialize('ilAdpSlcSs2PYQzZtC9k549MMrEq6GWBEkgPL052', '2ptwsyysoXq6KZ055Rz6qgAVLc6kGqq4geBcYGrV', '5o87OulNuELCkqYB3cju1ETOcLllLqB5K13F12Pg');
    $query = new ParseQuery("MerchantBuy");
    $query->equalto('objectId', $_GET["id"]);
    $result = $query->first();
    $_SESSION["id"] = $_GET["id"];
    $product = $result->get("Product");
    $cost = $result->get("cost");
    $maxAmount = $result->get("max_amount");
    $location = $result->get("Location");
} catch (Exception $e) {
}
?>


<form action="merchantupdatesingledata.php" method="post">
<div class="form-horizontal container col-sm-8 col-sm-offset-4 ">
    
    <table id="dataTable" class="col-sm-6">
開發者ID:lalitc375,項目名稱:Farmer_Merchant,代碼行數:31,代碼來源:merchantProductUpdateData.php

示例3: ParseQuery

</div>
</div>

</div>
</div><br><br><br>
<center><h3>Merchant Products</h3></center>
<br><br><br>

<?php 
require 'vendor/autoload.php';
use Parse\ParseClient;
use Parse\ParseObject;
use Parse\ParseQuery;
ParseClient::initialize('ilAdpSlcSs2PYQzZtC9k549MMrEq6GWBEkgPL052', '2ptwsyysoXq6KZ055Rz6qgAVLc6kGqq4geBcYGrV', '5o87OulNuELCkqYB3cju1ETOcLllLqB5K13F12Pg');
?>
<table class="table">
 <?php 
$query = new ParseQuery("MerchantBuy");
$query->equalto("Merchant_Id", $_SESSION["contact_no"]);
$result = $query->find();
echo "<tr>\n  <td>\n<b> S.No</b>\n </td>\n <td>\n<b> Product</b>\n </td>\n  <td>\n<b> Cost(Per Kg)</b>\n </td>\n  <td>\n<b> Maximum Amount(Kg)</b>\n </td>\n  <td>\n<b> Location</b>\n </td>\n <td><b>Delete\n </b></td>\n </tr>";
for ($i = 0; $i < count($result); ++$i) {
    echo "<tr><td>" . ($i + 1) . "</td><td>" . $result[$i]->get("Product") . "</td><td>" . $result[$i]->get("cost") . "</td><td>" . $result[$i]->get("max_amount") . "</td><td>" . $result[$i]->get("Location") . "</td><td>" . "<a href='http://localhost/Pragyan_Hack/merchantdeletedata.php?id=" . $result[$i]->getObjectId() . "'>Delete</a></td></tr>";
}
?>
</table>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="js/bootstrap.min.js"></script>
</body>
</html>
開發者ID:lalitc375,項目名稱:Farmer_Merchant,代碼行數:31,代碼來源:merchantProductDelete.php


注:本文中的Parse\ParseQuery::equalto方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。