Ver Mensaje Individual
  #1 (permalink)  
Antiguo 24/01/2013, 13:01
Avatar de andres_15_
andres_15_
 
Fecha de Ingreso: septiembre-2008
Ubicación: Cali
Mensajes: 232
Antigüedad: 15 años, 7 meses
Puntos: 7
mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in

Me sale este error mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in. que podria ser. aqui les muestro el codigo

Código PHP:
<html>
<head>
<title>
</title>
</head>
<body>

    <?php

    
include ("../Conexion/conexion.php");


    if (
$_POST){

        
$id=$_POST["id"];


        
$sql="select Identificacion,FechaExpedicion from informacion where Identificación= '$id'; ";

        
$datos=mysqli_query($con,$sql);

        echo 
"$sql";
    }

    
?>

<form action="" method="POST">
    <meta http-equiv="content-type" content="text/html ; charset=utf-8">

<fieldset>
    <legend>
        Consultar Empleado
    </legend>


    Ingrese el número de identificación del empleado <input type="text" name="id">

    <label>
        <input type="submit" value="Consultar">
    </label>
</fieldset>

<table align="center" border="5">
                <tr>
                    <td colspan="6" align="center">EMPLEADOS</td>
                </tr>
            <tr>
                <td align="center">ID</td>
                <td align="center">Fecha</td>
                
            </tr>
            <?php
                
while($reg=mysqli_fetch_array($datos))//ESTA ES LA LINA DONDE DICE QUE HAY ERROR
                
{
            
?>
            <tr>
                <td align="center" ><?php echo $reg["Identificacion"];?>    </td>
                <td align="center" ><?php echo $reg["FechaExpedicion"];?>    </td>
            
            </tr>
            <?php
                
}
            
?>
            </table>

</form>

</body>
</html>