Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

How to bind to column value with Builder


I want to bind a value to column with Phalcon\Mvc\Model\Query\Builder

public function findSomething($value)
    ->columns(':value: as someValue, ...')
    // ->bind(['value' => $value])  // like this

Is there any way?

Best Regards,

edited Apr '18

Hmm, you really want to have dynamic column names?

Try like this:

    'value' => $value,
edited Apr '18

Thank you for your response.

I want to have dynamic column values. (not names)

In my example, column name is someValue.

Anyway, I will try it later.


Hello Nikolay,

It worked fine.

Thank you so much.