| От | Doug McNaught |
|---|---|
| Тема | Re: [GENERAL] More PHP DB abstraction layer stuff |
| Дата | |
| Msg-id | m3y95ami5k.fsf@varsoon.wireboard.com обсуждение исходный текст |
| Ответ на | Re: [GENERAL] More PHP DB abstraction layer stuff (Dennis Gearon <gearond@cvc.net>) |
| Список | pgsql-interfaces |
Dennis Gearon <gearond@cvc.net> writes:
> could you elaborate on:
>
> Place holders ( those are in prepared queries, yes?)
> out of band?
I think by "out of band" Greg just means substituting values into a
prepared query rather than glomming everything into an SQL string by
yourself. For example, in Perl DBI you'd do something like:
$stmt = $dbh->prepare("select * from mytable where first_name = ?");
$ret_val = $sth->execute("Fred"); # might come from a web form instead
@row = $sth->fetchrow_array();
The database driver is responsible for turning the '?' in the query
into a properly-quoted and escaped value, or otherwise supplying it to
the database. The '?' is a placeholder.
-Doug
В списке pgsql-interfaces по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера