Comments (8)
I'm workign on that
from parse.com-php-library.
Check out https://github.com/jobiwankanobi/parse.com-php-library/blob/master/parseQuery.php
I added the ability to query for roles in whereRelatedTo()
from parse.com-php-library.
Oops you'll also need: https://github.com/jobiwankanobi/parse.com-php-library/blob/master/parse.php
I changed how the keys are set at the top of the file, so you might just want to insert this section in the switch($type) section of dataType();
case 'relatedTo':
$return = array(
"object" => $params[0], // pointer
"key" => $params[1] // key
);
break;
from parse.com-php-library.
Hi thanks for your help
please view the code below
stdClass Object
(
[results] => Array
(
[0] => stdClass Object
(
[dateExpired] => stdClass Object
(
[__type] => Date
[iso] => 2012-12-31T04:00:00.000Z
)
[dateIssued] => stdClass Object
(
[__type] => Date
[iso] => 2012-12-01T04:00:00.000Z
)
[offeringText] => Once you redeem this coupon you will have 45 min and it will automatically delete from your phone.
[percentOff] => 15
[tier] => 1
[title] => 15% Off
[infProductObjectId] => stdClass Object
(
[__type] => Relation
[className] => infProduct
)
[infManufacturerObjectId] => stdClass Object
(
[__type] => Relation
[className] => infManufacturer
)
[createdAt] => 2012-12-06T23:59:58.672Z
[updatedAt] => 2012-12-07T00:20:52.316Z
[objectId] => wqS9t98m98
)
)
)
on this code i need to get [__type] => Relation of data but i am stuck here no way to get either on another new query or in same single query.
please help me for this
from parse.com-php-library.
public function whereRelatedTo($key,$className,$objectId) {
I didn't get the classname from the code, but let's assume it's 'Offering'.
well with my new code, you could do another query that says:
$query = new Query('infManufacturer');
$query->whereRelatedTo('infManufacturerObjectId', 'Offering', 'wqS9t98m98');
By the way, I think your object model isn't correct. For one-to-one, you r infManufacturerObjectId should be a pointer instead of a relation. But I think it will still work as a relation.
from parse.com-php-library.
Thanks for you reply.
let me tell you my table structure
i want to get results from "infCoupon" and it has field called "infManufacturerObjectId"(relation) with "infManufacturer" table.
now i want to get all results from infCoupon and with Manufacturer details as well.
as your provided code need's me to add objectId which is i can't understand.
Thanks,
Shahid
from parse.com-php-library.
Yes thanks got it get result please confirm me one thing can i get this relation result in single query or i have to use sub query in for loop to get for each individual result.
from parse.com-php-library.
Oh good.
Subquery? I think yes. But try on query infCoupon
$query->whereInclude('infManufacturerObjectId');
$query->whereInclude('infProductObjectId');
from parse.com-php-library.
Related Issues (20)
- Reason for inclusion of all files? HOT 2
- Undefined property: stdClass::$code at line 267 in parse.php when "parse.com error: unauthorized" HOT 1
- Fatal error: Uncaught ParseLibraryException: [103]: parse.com error: class name must be a string thrown HOT 1
- Join two classes data HOT 2
- Many-to-Many relationship
- subscription always shows as 0 when send notification to android using reset api
- HELP URGENT on update row on User class using rest api
- saving or updating only works on string fields HOT 1
- cant save date to date field in parse HOT 2
- Failed to connect to api.parse.com port 443: Timed out HOT 1
- Issue with file upload HOT 1
- File Upload HOT 1
- I am trying to send a push notification using query where objectId equals to HOT 1
- how to write like oparator?
- How do I just get an array of everything in a table? HOT 4
- Cant save simple data
- how search file parseConfig.php? HOT 1
- how filter this error ?
- matches query in parse php
- Modified For Drupal HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from parse.com-php-library.