You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@phoenix.apache.org by Cheyenne Forbes <ch...@gmail.com> on 2016/12/08 20:11:32 UTC
Can I reuse parameter values in phoenix query?
So instead of doing:
query("select from table where c1 = ? or c2 = ?", [my_id, my_id])
i would do:
query("select from table where c1 = ?1 or c2 = ?1", [my_id])
Re: Can I reuse parameter values in phoenix query?
Posted by Cheyenne Forbes <ch...@gmail.com>.
thank you
Re: Can I reuse parameter values in phoenix query?
Posted by James Taylor <ja...@apache.org>.
Yes - use :1 instead of ?1
On Thu, Dec 8, 2016 at 12:11 PM Cheyenne Forbes <
cheyenne.osanu.forbes@gmail.com> wrote:
> So instead of doing:
>
> query("select from table where c1 = ? or c2 = ?", [my_id, my_id])
>
> i would do:
>
> query("select from table where c1 = ?1 or c2 = ?1", [my_id])
>
>
>