Re: [GENERAL] Reordering results for a report

Поиск
Список
Период
Сортировка
От Tino Wildenhain
Тема Re: [GENERAL] Reordering results for a report
Дата
Msg-id 3FDD789A.7060201@wildenhain.de
обсуждение исходный текст
Ответ на Re: [GENERAL] Reordering results for a report  ("scott.marlowe" <scott.marlowe@ihs.com>)
Список pgsql-php
Hi Scott,

scott.marlowe schrieb:
[...]
>
> print "<url goes here...>?orderby=".$flds[$i]."moreurlstuffhere???";
>
> Then, if the orderby is set when you build your query, just append it:
>
> if (isset($orderby)){
>   $query.= "order by ".$orderby"
> }
>
> Add some directional control:
>
> if (isset($dir)){
>   if ($dir=="down") $query.=" DESC";
> }
>
[...]

This leads to a nice SQL-injection posibility.
At least it has to made sure that no illegal
data can be transported via $orderby

Regards
Tino


В списке pgsql-php по дате отправления:

Предыдущее
От: Gerard Samuel
Дата:
Сообщение: Re: [PHP-DB] pg_result_error()
Следующее
От: "1M4M M4L1K"
Дата:
Сообщение: export table stucture