本文整理汇总了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');
}
示例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">
示例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>