dhtmlxcombo filteringmode

For using filtering mode, I can use z.enableFilteringMode(true,“loadCombo.php”,true,true);

The combo will add the POST headers pos and mask when calling the php file.

But then I have to use as many php scripts as combos I’ll have to fill. (different queries needed for each combo)



I tried z.enableFilteringMode(true,“loadCombo.php?select=myselect”,true,true);

but that results in loadCombo.php?select=myselect?pos=0?mask=mytext, which doesn’t work as suspected.



So, how do I put all my queries in 1 php file and call that file using filteringmode?




Hello,


which combo version do you use ?


The issue isn’t reproduced with the latest one.


For now, I don’t know the version, but it should at least be one of the latest.



Maybe it’s my mistake and it does work (after trying different coding). I apologize for that.



But, I can’t get it to work in combination with the php function render_sql (combo_connector).



I think the funtion doesn’t return anyting, but did not have time to investigate it yet.



(I do know my query is ok)



Maybe you can give my an example already.


The example: combo.enableFilteringMode(true,“test.php”,true,true);


the test.php:


require_once("…/config.php");


$res=mysql_connect($mysql_server,$mysql_user,$mysql_pass);
mysql_select_db($mysql_db);

require("…/…/codebase/combo_connector.php");

$combo = new ComboConnector($res);
$combo->enable_log(“temp.log”);
$combo->dynamic_loading(100);
$combo->render_table(“Countries”,“item_id”,“item_nm,item_cd”);


I did not use $combo->dynamic_loading(100);
Is it necessary? And t the manual it says it does not require any parameters for combo.



 



I don’t understand $combo->render_table(“Countries”,“item_id”,“item_nm,item_cd”); since i use render_sql to fill my combo’s.



I did enable the logging this time and it seems there is some text added to my query which makes the query faulty.



My code:



$combo->render_sql(“SELECT DISTINCT profielid, CONCAT(achternaam,’, ',voornaam) as naam FROM “.$profieltabel.” WHERE achternaam LIKE '”.$mask."%’ ORDER BY achternaam, voornaam ASC LIMIT “.$pos.”, 100",“profielid”,“naam”);



produces the query:



SELECT  DISTINCT profielid, CONCAT(achternaam,’, ',voornaam) as naam  FROM  profielen  WHERE  achternaam LIKE ‘cools%’  AND naam LIKE ‘%cools%’ ORDER BY  achternaam, voornaam ASC LIMIT 0, 100


The correct approach in this case is:


$combo->dynamic_loading(100); /it is necessary to attach limit block to the query automatically/


$combo->render_sql(" DISTINCT profielid, CONCAT(achternaam,', ',voornaam) as naam FROM profielen",“profielid”,“achternaam(naam)”);


But we have found the issue in the combo connector.So, please try to use attached file instead of the original one


combo_connector.php.zip (1.17 KB)


I don’t need a special php file (yet) if it works like you suggested.



I do have to say the “manuals” are not detailed at all.



When you do a bit of more than basic programming, you can’t do it without the knowlegdebase.



Or am I stupid and had to take a betterlook at the manual to find you have to do it like you suggested?



But I’m very glad with the assistance everytime is given.



 



Thank you very much.


>> I do have to say the “manuals” are not detailed at all.


Thank you for the remark. We are working on making documentation more informative.