DarkSamurai <[EMAIL PROTECTED]> writes: > And suppose I use this : > > > $cat = $GET["category"]; > > $query = " SELECT Id, Title, Abstract FROM News " . "Where Category=" . $cat;
>From a security point of view you're even better off using something like $dbh->query("SELECT id, title, abstract FROM news WHERE category = ?", $cat); Or whatever the equivalent syntax is in your driver. Avoiding mixing user-provided data with the code entirely. The driver may still have to do the mixing but it's probably better at it than you are. And in newer versions of Postgres it doesn't even have to do it at all, and can ship the data to the server separately. -- greg ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html