Ver Mensaje Individual
  #1 (permalink)  
Antiguo 09/12/2008, 14:43
Avatar de vennersteve
vennersteve
 
Fecha de Ingreso: noviembre-2008
Ubicación: San Andrés - Isla
Mensajes: 26
Antigüedad: 15 años, 5 meses
Puntos: 0
Consulta no muestra primer registro por usuario

Estoy haciendo un script para poder visualizar los registros realizados por operador/usuario, pero al correrlo me dí cuenta que no muestra el primer registro de cada caso de usuario.

Código PHP:
<?php
    
include ("ocassion_text.php");
    include (
"no_cache.php");
    include (
"calc_time1.php");
    
$query_user $_GET['user'];
    include(
"connect_db.php");
       
$link connect_db();
    
$result mysql_query("SELECT * FROM invoice WHERE LoggedUser = '$query_user'",$link);
    
$array mysql_fetch_array($result);    
?>
<html>
    <head>
        <title>C. E. S. F. A | Preview User Records</title>
        <link rel="stylesheet" type="text/css" href="css/stylesheet.css">
        <link type="image/x-icon" href="favicon.ico" rel="shortcut icon">
    </head>
    <body bgcolor="#8f8f8f">
    <br><br>
        <table align="center" width="70%" bgcolor="#00CCFF" border="1" bordercolor="#000000">
            <tr>
                <td align="center">
                    <?php echo WEBSITETITLE?>
                </td>
            </tr>
            <tr>
                <td align="center">
                    <h1><label><?php echo VIPU?></label>
                    </h1>
                    <form method="get" action="preview_user_insert.php">
                        <input type="radio" name="user" value="ender">Ender
                        <input type="radio" name="user" value="gloria">Gloria
                        <input type="radio" name="user" value="joice">Joice
                        <br><br>
                        <input type="submit" value="Check Records">
                    </form>
                </td>
            </tr>
        </table>        
        <?php if (isset($_GET['user']))
            {
                echo 
"<hr><table align=\"center\" border=\"1\" cellpadding=\"1\" cellspacing=\"1\" width=\"80%\">
                    <tr align=\center\">
                        <td class=\"resultheader\">Id</td>
                        <td class=\"resultheader\">Date</td>
                        <td class=\"resultheader\">Customer</td>
                        <td class=\"resultheader\">Address</td>
                        <td class=\"resultheader\">Phone</td>
                        <td class=\"resultheader\">Quantity</td>
                        <td class=\"resultheader\">Description</td>
                        <td class=\"resultheader\">Price</td>
                        <td class=\"resultheader\">Total</td>
                    </tr>"
;
            }
        
?>
    <?php while($array mysql_fetch_array($result)) {
    echo 
'<tr align=center><td>';
    echo 
$array['IdInvoice']."&nbsp;</td><td>";
    echo 
$array['DateInvoice']."&nbsp;</td><td>";
    echo 
$array['CustomerInvoice']."&nbsp;</td><td>";
    echo 
$array['AddressInvoice']."&nbsp;</td><td>";
    echo 
$array['PhoneInvoice']."&nbsp;</td><td>";
    echo 
$array['QuantityInvoice']."&nbsp;</td><td>";
    echo 
$array['DescriptionInvoice']."&nbsp;</td><td>";
    echo 
$array['PriceUnitInvoice']."&nbsp;</td><td>";
    echo 
$array['PriceTotalInvoice']."&nbsp;</td></tr>";

?>
    
    
    
        <?php if (isset($_GET['user']))
            {
                echo 
"</table>";
            }
        
?>
        <hr>
        <?php echo WEBSITECREDIT?>
    </body>
</html>
<?php
    
include ("calc_time2.php");
    echo 
GENTIME$gen_timeReal .GEN_TIME ;
?>
Ayuda!!