Re: Selecting 3 database columns
Posted by:
gcan (IP Logged)
Date: November 24, 2008 05:26AM
Hello Panos,
Thank you very much for yout reply.
Your suggestion works, but... only with first select box (islands) - it shows both retrieved records. When I add "concat" to Municipalities and Cities, the script stops working - second select box stays dead and doesn't show any municipalities list when I change "island" in the first select box.
This is my script. Everything looks correct, but the script doesn't like something.
$sc_ajax_select_boxes->add_select_box('islands','id',"concat(name,' (',total_number,')')",'id','','f_island','island_id','','',$text1);
$sc_ajax_select_boxes->add_select_box('municipalities','id',"concat(name,' (',total_number,')')",'name','','f_municipality','municipality_id','','',$text1);
$sc_ajax_select_boxes->add_select_box('cities','id',"concat(name,' (',total_number,')')",'name','','f_city','city_id','','',$text1);