Using style in a mysql CONCAT
Posted: Sat Nov 15, 2008 9:37 am
Is there any way to apply a style to Category in the following so that the Category in the drop down box will show up red?
<select onchange="display_data(this.value);">
<option>Select A Company</option>
<?php
$query="select names_id as id,
CONCAT(ucase(nam_category), ', ', nam_company) AS full_name
FROM names
WHERE nam_type = 'B'
ORDER BY full_name";
$result=mysql_query($query);
while(list($id, $full_name)=mysql_fetch_row($result)) {
echo "<option value=\"".$id."\">".$full_name."</option>";
}
?>
</select>
<select onchange="display_data(this.value);">
<option>Select A Company</option>
<?php
$query="select names_id as id,
CONCAT(ucase(nam_category), ', ', nam_company) AS full_name
FROM names
WHERE nam_type = 'B'
ORDER BY full_name";
$result=mysql_query($query);
while(list($id, $full_name)=mysql_fetch_row($result)) {
echo "<option value=\"".$id."\">".$full_name."</option>";
}
?>
</select>