-
Notifications
You must be signed in to change notification settings - Fork 334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MySQL Error when add colum and make a seach (error near LIKE) #95
Comments
Hi, When you write the JS code and you declare your columns, you need to disable ordering and searchable : columns: [
{data: "col1"},
{data: "col2"},
{data: "action", orderable: false, searchable: false}
], |
No need to change anything feathers add columns: in view |
trying this and the issue is the same You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIKE '%8d9%' ) ORDER BY SELECT * FROM ( @tiegosilveira thank you, but what do you mean by adding columns in view ? {"data": "url", |
I think he means by adding column in html side. |
thanks @rooferz for reply
|
Be sure in your database there are filter and userId columns |
Becareful of not having a single one colunm to be searchable. If server side is true you all search will be on server side and not with DOM elements. |
yes, they exist |
after tracing code I replace this line 315 $sWhere .= $this->select[$mColArray[$i]['data']] . " LIKE '%" . $sSearch . "%' OR "; with this: $sWhere .= $mColArray[$i]['data'] . " LIKE '%" . $sSearch . "%' OR "; and now search works perfectly |
private function get_filtering()
|
When we add colum ($this->datatables->add_column) and we make a search they are an error of datatable (they are a LIKE in SQL request who have no colum name).
I've modified the Library at line 311 like this:
It's a soluce ?
Tell me if you integer this part of your marvelous Library.
Cordialy
The text was updated successfully, but these errors were encountered: