How do I just get an array of everything in a table?
EwanValentine opened this issue · 4 comments
I've tried a few things and there doesn't seem to be a simple way to do it.
$this->gig = new ParseQuery("Gig");
$this->gig->find();
Any suggestions?
depends how big your dataset is.
You can limit the number of results by setting limit. By default, results are limited to 100, but anything from 1 to 1000 is a valid limit:
$this->gig->limit(1000);
Thanks for the speedy reply. I should have given you more context. I'm using Parse with Symfony and I'm attempting to query parse and fire the data into a twig template.
I know I can do for example:
foreach($this->gig->find(25) as $gig) {
echo $gig->get('title');
}
However, I can't do:
{% for gig in gigs %}
{{ gig.title }}
{% endfor %}
As twig can't call the get() function on the ParseObject itself. So I just wondered if there was any way of sanitising the data first at all?
Cheers
yeah... no clue there mate. Sorry. I did find that you could enable both twig and php for templating.
http://symfony.com/doc/current/cookbook/templating/PHP.html
that's all I got on it. Haven't mucked with Symfony yet.
I've sussed it! Cheers anyway :)