dynamic prepared statement

Dear All,

I want to create a command to query column(s) from a table with condition, but i just could not find the right way to construct the right dynamic prepared statement, here following is my coding :

iselect(Columns, Table, Where, Where_val, Server) ->
case ejabberd_sql:sql_query(
Server,
?SQL("SELECT @(%(Columns)s)s FROM %(Table)s WHERE %(Where)s = %(Where_val)s")) of

Please help.
Thanks.

Syndicate content

Hello! Forums are READ-ONLY.

Ask development questions on Stack Overflow »

Ask administration questions on Server Fault »

Join us in ejabberd chatroom »