Error when searching through a column of ENUM data type values

QuestionsError when searching through a column of ENUM data type values
Melissa Yip asked 6 years ago

I encounter this error message when using the search feature for enums. This occurs in both versions 2.1 and 2.6. Thanks.

 

View post on imgur.com

4 Answers
Abu Ghufran Staff answered 6 years ago

Basically, it’s a end-user error message. For actual technical error message set:

$g->debug = 1;

where $g is jqgrid() object. And most likely it will be a SQL query issue. Check or Send that message here if not solved.

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Melissa Yip answered 6 years ago

Here’s the error message I’m getting with debug turned on. Is there a reason why we’re passing an enum to lower()?

View post on imgur.com

Abu Ghufran Staff answered 6 years ago

In your enum case, it is trying to performing (case insensitive) contains search.

On enum column, you can limit equal search. To perform equal search.

$col[“searchoptions”][“sopt”] = array(“eq”);

// optionally set limited search operators
// (e.g. bw = begins with, ‘eq’,’ne’,’lt’,’le’,’gt’,’ge’,’bw’,’bn’,’in’,’ni’,’ew’,’en’,’cn’,’nc’)

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Melissa Yip answered 6 years ago

Thanks, Abu. That resolved my issue.

Your Answer

19 + 12 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?