1rosehip / jplist

jPList jQuery Data Grid Controls is a flexible jQuery plugin for sorting, pagination and filtering of any HTML structure (DIVs, UL/LI, tables, etc).
http://jplist.com
Other
437 stars 177 forks source link

Not sure if bug or my stupidity ( textbox control) #128

Closed safiboss closed 8 years ago

safiboss commented 9 years ago

First of all, I would like to thank to the developer for this fantastic plugin!

I have been working with it and everything works as expected but I am not able to run the textbox control properly. I read the documentation carefully and I do not find the error. When I clicked the button filter, it does not found any matching data... it is strange.

It would be amasing if you can help me!

I post the code that I used to illustrate my problem, maybe the plugin does not do the join query right?.... not sure:

in header I included the textbox js

    <script src="js/jplist.textbox-filter.min.js"></script>
    <link href="css/jplist.textbox-filter.min.css" rel="stylesheet" type="text/css" />

In the body of the html I specified the path:

``` The textbox.php function... function textbox($status){ ``` $data = $status->data; $result = null; if(isset($data->path) && isset($data->value) && $data->value){ $result = new FilterResultModel(); $result->param = "%$data->value%"; switch($data->path){ case ".apellidos":{ $result->query = " apellidos like ? "; break; } case ".desc":{ $result->query = " description like ? "; break; } } } return $result; } ``` The server.php file, I changed the query as follow: $query = "SELECT DISTINCT a.nombre, a.apellidos,a.calle, a.portal, a.piso, a.municipio, a.imagen, a.descripcion,a.telefono,a.codigo_postal, group_concat(concat(i.area) SEPARATOR ', ') as areas FROM abogadospersonaldata a LEFT JOIN abogadosespecialidad i ON a.id_abogados = i.id_abogados GROUP BY a.nombre "; And the output is shown from the server-html.php: private function getHTML($item){ ``` $html = ""; $html .= "
"; $html .= "
"; $html .= " "; $html .= "
"; $html .= "
"; $html .= "

" . $item['nombre'] . " ". $item['apellidos'] . "

"; $html .= "
"; $html .= "
"; return $html; } ```
1rosehip commented 9 years ago

Please send the link to your page so I could see the issue.