$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: loufoque (mathias.gaunard_at_[hidden])
Date: 2006-09-12 14:31:26
Paul Davis wrote :
>
> id = "2 ; delete from persons ;"
>
> sql << "select first_name, last_name, date_of_birth "
> "from persons where id = " << id
>
>
> Someone just deleted your persons table. Oops.
In my example sql was supposed to be a special stream type overloaded to
escape types correctly. I thought SOCI worked that way, but in fact it
seems it is not the case.
You could do this, though
std::string name;
sql << "select phone from phonebook where name = :name",
use(name);