Permalink
Browse files

quote identifiers

  • Loading branch information...
1 parent 77fb4f4 commit a3997580d33dbd98beb75af59f9047c4fdf3a798 @xzilla committed Sep 15, 2008
Showing with 4 additions and 3 deletions.
  1. +4 −3 autocomplete.php
View
@@ -3,9 +3,10 @@
$data->clean($_REQUEST['tb']);
$data->clean($_REQUEST['fk']);
$data->clean($_REQUEST['v']);
-
- $szSQL = 'SELECT * FROM ' . $_REQUEST['tb'] . ' WHERE ' . $_REQUEST['fk']
- . "::text LIKE '" . $_REQUEST['v'] . "%' ORDER BY ". $_REQUEST['fk'] ." LIMIT 11";
+
+ // FIXME: At some point this should be schema qualified
+ $szSQL = 'SELECT * FROM "' . $_REQUEST['tb'] . '" WHERE "' . $_REQUEST['fk']
+ . "\"::text LIKE '" . $_REQUEST['v'] . "%' ORDER BY \"". $_REQUEST['fk'] .'" LIMIT 11';
$objRes = $data->selectSet($szSQL);
$arrayRes = array();

0 comments on commit a399758

Please sign in to comment.