Find Graduates you get results for every ML that has a \"1\" in it, for example, ML11, ML12, and so on. The same thi..." />
  1. joenglesson
  2. Features Request
  3. Friday, January 31 2014, 02:40 PM
Hello,

On this page when I search for a specific team (ML1) I get ML1, ML10, ML11, ML12, listed.
http://gtgradweb.com/index.php/contacts/find-graduates

A technical matter. If you try to search for "ML1" under Contacts ->
Find Graduates you get results for every ML that has a "1" in it, for
example, ML11, ML12, and so on. The same thing would happen when ML's get
into the 20's, a search for ML2 would yield results including ML20, ML21,
etc.

Is there a way to fix this? Or work around it?
admin Accepted Answer
Admin
Hi,
sorry for late reply.
the search of text field search in DB the occurrences of the string. Is correct that if you search for "ML1" you will find "ML1,ML10,ecc.."
You can do this mod:
on file /administrator/components/com_jsn/helpers/fields/text.php at line 95 replace this:
$query->where('b.'.$db->quoteName($field->alias).' LIKE '.$db->quote('%'.JRequest::getVar($field->alias,null).'%'));

with this
$query->where('b.'.$db->quoteName($field->alias).' LIKE '.$db->quote(JRequest::getVar($field->alias,null)));

or only for ml_or_gt_if_part_2_grad field replace with this:
if($field->alias=="ml_or_gt_if_part_2_grad") $query->where('b.'.$db->quoteName($field->alias).' LIKE '.$db->quote(JRequest::getVar($field->alias,null)));
else $query->where('b.'.$db->quoteName($field->alias).' LIKE '.$db->quote('%'.JRequest::getVar($field->alias,null).'%'));
  1. more than a month ago
  2. Features Request
  3. # 1
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.
Sorry, the discussion is currently locked. You will not be able to post a reply at the moment.