public function getCategoryHints($q) { $query = "select categoryid,name from couponcategories where name LIKE '" . htmlspecialchars($q) . "%'" . " limit 1"; $dbinstance = dbconnection::getinstance(); $connhandle = $dbinstance->connhandle; $result = $connhandle->query($query); return $result; }