esto es una funcion que rellena una tabla y m pone unos clientes ordenados por apellidos, pero misteriosamente los apellidos me los escribe con mayusculas todas las letras y no entiendo porque,es un codigo ya echo que debo cambiar..
alguien ve porque me lo escribe asi?
PEREZ Eduardo
GONZALEZ Pepito
...
...
...
codigo
function getSelectValue_3(&$tpl,$script,$letter)
{
global $MySQL;
global $COLOR;
global $HTTP_SESSION_VARS;
global $country_html;
global $services_html;
global $companylist_html;
$fromtable = "";
if ($services_html>0)
{
$fromtable = ", customers_services CS";
$condition = "(C.surname like '$letter%')and (C.country like '$country_html%') and (C.cus_id=CS.cus_id) and (CS.serv_id=$services_html)and (C.company like '$companylist_html%')";
}
else{
$condition = "(C.surname like '$letter%')AND (C.country like '$country_html%') AND (C.company like '$companylist_html%')";
}
$sql = "select
C.surname,
C.firstname,
C.cus_id
from
customers C $fromtable
where ($condition)
order by C.surname";
$result = send_sql($MySQL->db1, $sql);
if (!$result)
{
die ("Database Error");
}
$i = 65;
while($i<=90)
{
if($letter == chr($i))
{
$option='<OPTION value="'.chr($i).'" selected>'.chr($i).'';
$option_line=$option_line.$option;
}
else
{
$option='<OPTION value="'.chr($i).'">'.chr($i).'';
$option_line=$option_line.$option;
}
$i++;
}
$tpl->assign(TABLE_ROW_1,$option_line);
$option_line="";
while ($value=mysql_fetch_array($result))
{
$company_name=$value[0].' '.$value[1];
$id = R4crypt($value[2]);
$option='<OPTION value="'.$id.'">'.$company_name.'';
$option_line=$option_line.$option;
}
$tpl->assign(TABLE_ROW,$option_line);
}
muchas gracias