Re: [Cppcms-users] statement::bind can be deceptive/dangerous
Brought to you by:
artyom-beilis
|
From: <ele...@ex...> - 2012-05-07 07:57:43
|
> sql << "INSERT ..." << ... << r.get<string>("date_action")) << ... <<
> cppdb::exec;
>
> This would be valid as the return value remains withing the statement.
>
> Artyom Beilis.
I understand that however what if you need to do something like this -
cppdb::statement st;
st = sql.prepare(...)
st << one << two;
if (condition is true)
st << three << four
else
st << five << six
end
st.exec()
In this case do I have to store all the variables on the function stack
before passing them to statement?
Petr
|