From: Tino Wildenhain <tino@wildenhain.de>
To: scott.marlowe <scott.marlowe@ihs.com>
Cc: Nathaniel Price <nprice@tesseract.net>
Cc: pgsql-php@postgresql.org
Subject: Re: [GENERAL] Reordering results for a report
Date: Mon, 15 Dec 2003 10:02:18 +0100
Message-ID: <3FDD789A.7060201@wildenhain.de> (raw)
In-Reply-To: <Pine.LNX.4.33.0312121331320.18667-100000@css120.ihs.com>
References: <Pine.LNX.4.33.0312121331320.18667-100000@css120.ihs.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: tino@wildenhain.de, scott.marlowe@ihs.com, nprice@tesseract.net
Subject: Re: [GENERAL] Reordering results for a report
In-Reply-To: <3FDD789A.7060201@wildenhain.de>
References: <Pine.LNX.4.33.0312121331320.18667-100000@css120.ihs.com> <3FDD789A.7060201@wildenhain.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox