[erlang-questions] emysql

Dmitry Kolesnikov dmkolesnikov@REDACTED
Thu Oct 31 22:16:57 CET 2013


Hello,

You can take a look to my template library 
https://github.com/fogfish/swirl

Here is quick code snippet

swirl:c(my_query, "UPDATE hello_table SET hello_text = '{baz}'").
my_query:render([{baz, "my text"}]).

Output:

"UPDATE hello_table SET hello_text = 'my text'"

Best Regards, 
Dmitry

On Oct 31, 2013, at 10:08 PM, Thomas Elsgaard <thomas.elsgaard@REDACTED> wrote:

> Hi list
>  
> How can i easiest replace 'baz' with content from an variable ?
>  
> emysql:execute(hello_pool, <<"UPDATE hello_table SET hello_text = 'baz'">>)
>  
> Thomas
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions




More information about the erlang-questions mailing list