Autocomplete

QuestionsAutocomplete
Gustavo Lazaro asked 7 years ago

Hello. In the sql on formatoptions, can I use the where clause?

$col["formatter"] = "autocomplete"; // autocomplete
$col["formatoptions"] = array("sql"=>"SELECT codProfesional AS k, nombre AS v FROM gen_profesional ORDER BY nombre", "search_on"=>"matricula", "update_field"=>"codProfesional");

1 Answers
Abu Ghufran answered 7 years ago

Yes, you can use WHERE clause in this sql.
e.g.
$col["formatoptions"] = array( "sql"=>"SELECT *, name as v FROM clients WHERE gender='female' ORDER BY name desc",
"search_on"=>"concat(name,'-',client_id)",…………..);

Your Answer

0 + 19 =

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?