Ver Mensaje Individual
  #1 (permalink)  
Antiguo 09/10/2007, 15:21
Avatar de hulray
hulray
 
Fecha de Ingreso: septiembre-2006
Mensajes: 630
Antigüedad: 17 años, 7 meses
Puntos: 3
Ayuda con tablas

El problema que tengo es que en el campo
"realname" del from no me lo arroja en la tabla, todos los otros campos si, vi la base de datos y si hay campos creados y llenados, se supone que me debe de arrojar nombres, pero nada, quien me puede ayudar?


Código PHP:
<?
if (strstr($PHP_SELF"/am_modules/"))  die ("Usted no puede accesar este archivo directamente...");

// Genero la fecha para la evaluacion de las 48 hrs [2 dias]

$fechan date("d/m/Y");

 
$f_ni_aa substr($fechan,6,4);
 
$f_ni_mm substr($fechan,3,2);
 
$f_ni_dd substr($fechan,0,2);

$hoy=$f_ni_aa.$f_ni_mm.$f_ni_dd;

$sel_sql "SELECT * from am_inspeccion ORDER BY ins_folio";
$resultado db_query($sel_sql) or die(db_error());


$i=mysql_fetch_array($resultado);
if (
$i){

//---> include idioma
//
  
$config["leng"] = "sp"// Español
  
include_once( "am_modules/inspec/idioma/msg_".check_lang($config["leng"]).".php" );

  
srand((double)microtime()*1000000);

  
draw_header();

if( ! 
$session["logged"] )
{
    
theme_draw_boxlg_TitConINGRESO_ACTIVATE_ERROR"100%" );
    
draw_footer();
    exit;
}
?>
<style type="text/css">
TD {
    font-size : 10px;
    font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
}
</style>
<?
echo"<h3 align=\"center\">Inspecciones realizadas</h3>";

echo 
"<table border=0 width=90%><tr>";
echo 
"<td></td><td>Folio</td><td>Fecha</td><td>Empresa</td><td>Ingresado por </td></tr>";

while(
$i=mysql_fetch_array($resultado)){

echo 
"<td><a href=\"contratista.php?id_insmod=$i[0]\" target=\"parent\"><img src=\"am_modules/downloads/derec.gif\" width=16 height=16 alt=\"click\" border=0 align=left></a></td>";
echo 
"<td>$i[0]</td>";

$f_fecing  substr($i["ins_fecing"],6,2)."/".substr($i["ins_fecing"],4,2)."/".substr($i["ins_fecing"],0,4);

echo 
"<td>$f_fecing</td><td>$i[3]</td>";

$nom_sql "SELECT realname FROM am_users WHERE name = '$i[ins_digito]'";
$nom     db_query($nom_sql) or die(db_error());
$nombre=db_fetch_array($nom);
$f_autor $nombre["realname"];


echo 
"<td>$f_autor</td></tr>";


}
}
?>