on the sample 02_customization - 18 Combo select from db, is it possible to display multiple fields in the combo-box. i’m going to have situation where the display values will be the same, so the user wont be able to distinguish which is which.
$combo->render_sql("select concat(LastName,', ',Firstname) AS mylabel FROM clients", "Num", "LastName", "FirstName", "mylabel");
now there is no error and it appears the combo box gets filled… but there’s no text displayed, you can see a blue line and actually scroll down and select something… it returns blank in the display field, but looks like a value was selected.???
In your sql you select only the ‘mylabel’ value, the columns listed in parameters are not reteived by your query.
Probably this code should work (suppose the value column named ‘Num’)
$combo->render_sql("SELECT `Num` as `key`, CONCAT(LastName,', ',Firstname) as label FROM clients","key","label");