Ver Mensaje Individual
  #18 (permalink)  
Antiguo 22/10/2010, 13:42
dianays
 
Fecha de Ingreso: agosto-2010
Mensajes: 147
Antigüedad: 13 años, 8 meses
Puntos: 1
Respuesta: Quiero mostrar mas de un dato...

bueno ia lo hice pero kiero q me muestre los datos y no me los muestra con la consulta... kise tratarlo de hacer como el anterior pero con otros datos pero me marca un error...

Warning: mysql_fetch_array() expects parameter 1 to be resource, string given in C:\wamp\www\prueba\detalle_folio.php on line 14

Código PHP:
Ver original
  1. <?php
  2. $CONEXION = mysql_connect("localhost","localhost","");
  3. mysql_select_db("bd_control", $CONEXION);
  4. ?>
  5.  
  6. <?php
  7. $folio = $_GET['folio'];
  8. $query = "SELECT folio, fecha, hora, unidad, area, reporta, tel, ext, vpn, inventario,
  9.         serie, ip, marca, modelo, dispositivo, falla, nombre, actividades
  10. FROM reporte, unidades, usuarios
  11. WHERE reporte.id_unidad=unidades.id_unidad
  12. AND reporte.id_nom=usuarios.id_nom AND folio = $folio "; // si folio es numerico
  13. $error=mysql_error($CONEXION); echo $error;
  14. while($fila=mysql_fetch_array($query)){
  15. echo "<table width='800' border='1' align='center'>
  16. <th width='90' scope='col'>FOLIO</th>
  17.             <th width='66' scope='col'>FECHA</th>
  18.             <th width='65' scope='col'>HORA</th>
  19.             <th width='69' scope='col'>UNIDAD</th>
  20.             <th width='90' scope='col'>AREA</th>
  21.             <th width='66' scope='col'>REPORTA</th>
  22.             <th width='65' scope='col'>TEL</th>
  23.             <th width='69' scope='col'>EXT</th>
  24.             <th width='90' scope='col'>VPN</th>
  25.             <th width='66' scope='col'>INVENTARIO</th>
  26.             <th width='65' scope='col'>SERIE</th>
  27.             <th width='69' scope='col'>IP</th>
  28.             <th width='90' scope='col'>MARCA</th>
  29.             <th width='66' scope='col'>MODELO</th>
  30.             <th width='65' scope='col'>DISPOSITIVO</th>
  31.             <th width='69' scope='col'>FALLA</th>
  32.             <th width='66' scope='col'>NOMBRE</th>
  33.             <th width='90' scope='col'>ACTIVIDADES</th>
  34.             </tr>
  35. <tr>
  36. <td>".$fila['folio']."</td>
  37.             <td>".$fila['fecha']."</td>
  38.             <td>".$fila['hora']."</td>
  39.             <td>".$fila['unidad']."</td>
  40.             <td>".$fila['area']."</td>
  41.             <td>".$fila['reporta']."</td>
  42.             <td>".$fila['tel']."</td>
  43.             <td>".$fila['ext']."</td>
  44.             <td>".$fila['vpn']."</td>
  45.             <td>".$fila['inventario']."</td>
  46.             <td>".$fila['serie']."</td>
  47.             <td>".$fila['ip']."</td>
  48.             <td>".$fila['marca']."</td>
  49.             <td>".$fila['modelo']."</td>
  50.             <td>".$fila['dispositivo']."</td>
  51.             <td>".$fila['falla']."</td>
  52.             <td>".$fila['nombre']."</td>
  53.             <td>".$fila['actividades']."</td>
  54.             </tr>
  55. </table>";
  56. }
  57. ?>