Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
By paul2289
#813506
I am connecting the suggest control to a Postgres database and have noticed that it is performing the queries case sensitive.
Looking at the logs on the database it is doing the following query
Code: Select all
Select field1,field2 FROM table1 LIKE "%search%"
To be case insensitive it should use ILIKE rather than LIKE.
Has anyone else had this issue?
Thanks.
User avatar
By amosbatto
#813527
I'm not sure where this is set.

In the file gulliver/methods/genericAjax.php, try changing from:
Code: Select all
    $sqlConditionLike = "LIKE '%" . $inputSel . "%'";

    switch ($searchType) {
        case "searchtype*":
            $sqlConditionLike = "LIKE '" . $inputSel . "%'";
            break;
        case "*searchtype":
            $sqlConditionLike = "LIKE '%" . $inputSel . "'";
            break;
    }
To:
Code: Select all
    $sqlConditionLike = "ILIKE '%" . $inputSel . "%'";

    switch ($searchType) {
        case "searchtype*":
            $sqlConditionLike = "ILIKE '" . $inputSel . "%'";
            break;
        case "*searchtype":
            $sqlConditionLike = "ILIKE '%" . $inputSel . "'";
            break;
    }
Does that fix it?

Being the best in the started business is the obje[…]

Winzo is a popular and unique game on the mobile p[…]

Cannot create process using templets

Real details. The problem was solved by effect!

However, it is essential to use it responsibly and[…]