4images Forum & Community

4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: Sun Zaza on November 24, 2014, 11:54:53 AM

Title: Dropbox in (db_field_definitions.php) whith 2 information in each row
Post by: Sun Zaza on November 24, 2014, 11:54:53 AM
Hi,

I have a small problem:

I am using this peace of code in db_field_definitions.php to get some info from the database (TRUCS).

Code: [Select]
$sql = "SELECT truc_name, truc_niveau
FROM ".TRUCS_TABLE."
WHERE truc_actief = 1
ORDER BY truc_name ASC";
$result = mysql_query($sql);
$truc_name = array("---");
while ($truc_row = $site_db->fetch_array($result)) {
$truc_name[] = current($truc_row);

$additional_combo_fields['combo_truc2'] = array($lang['combo_truc2'], "dropdown", 0, $truc_name, 0, 0, 0, 0);
}

The results in de dropbox is somthing like:
aaa
bbb
ccc
ddd

Now I want something like:

aaa (10)
bbb (40)
ccc (30)
ddd (200)

The numbers are from (truc_niveau).

I tried everything, but no luck.

Thank you in advance.
Cruxy