Ver Mensaje Individual
  #1 (permalink)  
Antiguo 28/11/2012, 10:18
Avatar de mager3
mager3
 
Fecha de Ingreso: junio-2012
Ubicación: Medellin
Mensajes: 318
Antigüedad: 11 años, 10 meses
Puntos: 4
Información odbc_fetch_into() no muestra los primeros dos registros

alguien que por favor me ayude....

tengo este codigo pero en pantalla deberia mostrar 1, 2, 3,4,5 pero muestra 3,4,5

estoy apenas aprendiendo pero creo que el problema radica en el odbc_fetch_into() aunque no estoy 100 % seguro...

Código PHP:
Ver original
  1. <html>
  2. <body>
  3. <table width="714" border="1" align="center">
  4.     <tr>
  5.     <td class="domingo"><strong>Accion</strong></td>
  6.       <td class="domingo"><strong>Numero Factura</strong></td>
  7.     </tr>
  8. <?php
  9. // --conexion a la base de datos SQL
  10. $dsn = "Driver={SQL Server};Server=MILENIUN\SQLEXPRESS;Database=C04;Integrated Security=SSPI;Persist Security Info=False;";
  11. // --clip--
  12. $cid = odbc_connect( $dsn, 'sa', 'sa' );
  13. $ask7 = "SELECT FACNumeroFacturaVentaEncabezadoFacturaVenta FROM FACENCABEZADOFACTURAVENTA";
  14. $R7 = odbc_exec($cid,$ask7);
  15. $result = odbc_result($R7,1);
  16. //echo $result;
  17. echo "Result or No Result??? --> ".odbc_fetch_row($R7);
  18.  
  19. $bug_workaround=0;
  20.  
  21. while ( odbc_fetch_into($R7,$inquiry))   //bien...
  22. {
  23.  
  24.  //echo $inquiry[0], $inquiry[1];
  25.  echo"<tr><td width=\"3%\"><font face=\"verdana\"><div align=center><a href=\"meco_2.php?factura='".$inquiry["0"]."'\"> Desmarcar</a></td>";
  26.     echo "<td width=\"10%\"><font face=\"verdana\">" . $inquiry["0"] . "</font></td></tr>";
  27. }
  28. // --clip-- */
  29. ?>
  30. </tr>
  31.  </table>
  32. </form>
  33. </body>
  34. </html>