</time>
            </a>
        </div>
        <div class="post-content"><div itemprop="text"><p>Ah sorry I missunderstood you. I don't think its possible to bind parameters inside orderBy like in where().</p>
<p>Usually I do as you do, check parameter and pass to the orderBy. Lets see if someone has another idea.</p></div></div>
        <div class="posts-buttons" align="right"><a href="#"  class="btn btn-danger btn-xs vote-login" data-id="36857" data-cf-modified-4d42def0d5342011c69a95c9-="">
                    <span class="glyphicon glyphicon-thumbs-down"></span></a>
                <a href="#"  class="btn btn-success btn-xs vote-login" data-id="36857" data-cf-modified-4d42def0d5342011c69a95c9-="">
                    <span class="glyphicon glyphicon-thumbs-up"></span></a></div>
    </div>
</div>
<div itemprop="suggestedAnswer" itemscope itemtype="https://schema.org/Answer" class="reply-block row">
    <div class="col-md-1 small" align="center">
        <img src="https://secure.gravatar.com/avatar/8da15621865643112c6e3243f2ce4ebe?s=48&amp;r=pg&amp;d=identicon" class="img-rounded" />        <br>

        <span itemprop="author" itemscope itemtype="https://schema.org/Person">
            <a href="/user/3812/Jurigag" class="user-moderator-Y"><span itemprop="name"><NAME></span></a>        </span>
        <br>

        <span class="karma">145.0k</span></div>
    <div class="col-md-11"><div class="posts-buttons" align="right"><a name="C36859" href="#C36859">
                <time itemprop="dateCreated" datetime="2016-07-18T13:09:37-07:00" class="action-date">Jul '16</time>
            </a>
        </div>
        <div class="post-content"><div itemprop="text"><p>Well in execute method you can pass binding params. I guess paginator classes need to be changed to accept bind.</p></div></div>
        <div class="posts-buttons" align="right"><a href="#"  class="btn btn-danger btn-xs vote-login" data-id="36859" data-cf-modified-4d42def0d5342011c69a95c9-="">
                    <span class="glyphicon glyphicon-thumbs-down"></span></a>
                <a href="#"  class="btn btn-success btn-xs vote-login" data-id="36859" data-cf-modified-4d42def0d5342011c69a95c9-="">
                    <span class="glyphicon glyphicon-thumbs-up"></span></a></div>
    </div>
</div>
<div itemprop="suggestedAnswer" itemscope itemtype="https://schema.org/Answer" class="reply-block row">
    <div class="col-md-1 small" align="center">
        <img src="https://secure.gravatar.com/avatar/eff69f4e1760f1b3c652281d4030d3cf?s=48&amp;r=pg&amp;d=identicon" class="img-rounded" />        <br>

        <span itemprop="author" itemscope itemtype="https://schema.org/Person">
            <a href="/user/2503/mraspor" class="user-moderator-N"><span itemprop="name">mraspor</span></a>        </span>
        <br>

        <span class="karma">12.2k</span></div>
    <div class="col-md-11"><div class="posts-buttons" align="right"><a name="C37029" href="#C37029">
                <time itemprop="dateCreated" datetime="2016-07-21T06:18:02-07:00" class="action-date">Jul '16</time>
            </a>
        </div>
        <div class="post-content"><div itemprop="text"><p><a href="https://forum.phalcon.io/user/7745/alitalaghat">@alitalaghat</a></p>
<p>Filter/Sanitize/Validate the <code>order</code> and <code>sort</code> values before using them in the query.</p>
<p>More on filters: <a href="https://docs.phalcon.io/en/latest/reference/filter.html">https://docs.phalcon.io/en/latest/reference/filter.html</a></p>
<p>Or you can validate, for example with InclusionIn:</p>
<pre><code class="language-php">&lt;?php

use Phalcon\Validation;
use Phalcon\Validation\Validator\InclusionIn;

$validator = new Validation();

$validator-&gt;add('sort', new InclusionIn(array(
  'message' =&gt; 'SORT must be ASC or DESC',
   'domain' =&gt; array('ASC', 'DESC'),
   'allowEmpty =&gt; true,
)));</code></pre>
<p>And then check if validation has errors:</p>
<pre><code class="language-php">&lt;?php

if($validator-&gt;validate($this-&gt;request-&gt;getQuery())-&gt;count() &gt; 0) { // or use $_GET
...
}</code></pre></div></div>
        <div class="posts-buttons" align="right"><a href="#"  class="btn btn-danger btn-xs vote-login" data-id="37029" data-cf-modified-4d42def0d5342011c69a95c9-="">
                    <span class="glyphicon glyphicon-thumbs-down"></span></a>
                <a href="#"  class="btn btn-success btn-xs vote-login" data-id="37029" data-cf-modified-4d42def0d5342011c69a95c9-="">
                    <span class="glyphicon glyphicon-thumbs-up"></span></a></div>
    </div>
</div>
<div itemprop="suggestedAnswer" itemscope itemtype="https://schema.org/Answer" class="reply-block row">
    <div class="col-md-1 small" align="center">
        <img src="https://secure.gravatar.com/avatar/8da15621865643112c6e3243f2ce4ebe?s=48&amp;r=pg&amp;d=identicon" class="img-rounded" />        <br>

        <span itemprop="author" itemscope itemtype="https://schema.org/Person">
            <a href="/user/3812/Jurigag" class="user-moderator-Y"><span itemprop="name"><NAME></span></a>        </span>
        <br>

        <span class="karma">145.0k</span></div>
    <div class="col-md-11"><div class="posts-buttons" align="right"><span class="action-date action-reply-edit" data-id="37031" data-toggle="modal" data-target="#historyModal">
                edited <span>Jul '16</span>
              </span><br/><a name="C37031" href="#C37031">
                <time itemprop="dateCreated" datetime="2016-07-21T07:06:52-07:00" class="action-date">Jul '16</time>
            </a>
        </div>
        <div class="post-content"><div itemprop="text"><p>Yea all you guys write is true, but it's just workaround :) There should be just bind parameter added which will be passed to execute method and that's it :) I already created NFR on github.</p></div></div>
        <div class="posts-buttons" align="right"><a href="#"  class="btn btn-danger btn-xs vote-login" data-id="37031" data-cf-modified-4d42def0d5342011c69a95c9-="">
                    <span class="glyphicon glyphicon-thumbs-down"></span></a>
                