From: soranzo Date: Thu, 4 Jan 2007 19:12:31 +0000 (+0000) Subject: Adapt to our code style X-Git-Tag: REL_4-1-1~34 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=42c7840cd0235ff90d81f662ec65fc92c9859eb0;p=phppgadmin.git Adapt to our code style --- diff --git a/autocomplete.php b/autocomplete.php index 983a9c62..823658c6 100644 --- a/autocomplete.php +++ b/autocomplete.php @@ -1,11 +1,11 @@ clean($_REQUEST["tb"]) ." where ". $data->clean($_REQUEST["fk"]) ." LIKE '". $data->clean($_REQUEST["v"]) ."%' LIMIT 11"; -$objRes = $data->selectSet($szSQL); -$arrayRes = array(); -while(!$objRes->EOF) { - $arrayRes[] = $objRes->fields[$_REQUEST["fk"]]; - $objRes->moveNext(); -} -echo implode("PPA_EOF;|",$arrayRes); + include_once('libraries/lib.inc.php'); + $szSQL = 'SELECT * FROM ' . $data->clean($_REQUEST['tb']) . ' WHERE ' . $data->clean($_REQUEST['fk']) . " LIKE '" . $data->clean($_REQUEST['v']) . "%' LIMIT 11"; + $objRes = $data->selectSet($szSQL); + $arrayRes = array(); + while (!$objRes->EOF) { + $arrayRes[] = $objRes->fields[$_REQUEST['fk']]; + $objRes->moveNext(); + } + echo implode('PPA_EOF;|', $arrayRes); ?>