Problem with like function in query |
hi frends
I created a table for categories with these specifications: 'id'=>[ 'type'=>'INT', 'unsigned'=>true, 'auto_increment'=>true, ], 'parent'=>[ 'type'=>'INT', 'unsigned'=>true, ], 'title'=>[ 'type'=>'VARCHAR', 'constraint'=>'255', ], 'technical'=>[ 'type'=>'TEXT', 'null'=>true, ], 'memo'=>[ 'type'=>'TEXT', 'null'=>true, ], 'status'=>[ 'type'=>'INT', 'default'=>'1', 'constraint'=>'2', ], I want to display the category content through a datatable and I wrote this query: $records = $category->select('*') ->like('title', $searchValue) ->orLike('technical', $searchValue) ->orLike('body', $searchValue) ->orderBy($columnName, $columnSortOrder) ->findAll($rowperpage, $start); But! As long as the body and technical columns have text data format, it gives an error and does not work, and only when I change their type to varchar does it work. What should I do to make it work with text type?
Maybe this would help?
https://codeigniter.com/user_guide/datab...likestring |
Welcome Guest, Not a member yet? Register Sign In |