1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| $sql = "
SELECT official_code, instr_code, instr_type, description, default_cur, risk_level,
COUNT(official_code) nombre
FROM instruments
WHERE official_code LIKE '%**%'
GROUP BY official_code, instr_code, instr_type, description, default_cur, risk_level
";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result))
{
$instruments["{$row["official_code"]}"]['instr_code'] = $row['instr_code'];
$instruments["{$row["official_code"]}"]['instr_type'] = $row['instr_type'];
$instruments["{$row["official_code"]}"]['description'] = $row['description'];
$instruments["{$row["official_code"]}"]['default_cur'] = $row['default_cur'];
$instruments["{$row["official_code"]}"]['risk_level'] = $row['risk_level'];
$instruments["{$row["official_code"]}"]['nombre'] = $row['nombre'];
} |