I'd try adding:
$conn = odbc_connect("pruebas_php", "", "")
or die("cannot connect to pruebas_php");
$resultado1 = odbc_exec($conn,"SELECT Nombre, Apellido1, Apellido2 FROM
Personas")
or die ("cannot execute query");
--
Regards,
Gary "SuperID" Huntress
=======================================================
FreeSQL.org offering free database hosting to developers
Visit http://superid.dyndns.org:8080/freesql/index.php
""Fernando Buitrago"" <[EMAIL PROTECTED]> wrote in message
9a6l42$e5r$[EMAIL PROTECTED]">news:9a6l42$e5r$[EMAIL PROTECTED]...
> Well, this is my code, but it dosen't work, please, help me, this table
has
> 5 records, and the result of the query is -1.
>
> Code
>
> <html>
> <head>
> <title>Lista Datos</title>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> </head>
>
> <body bgcolor="#FFFFFF" text="#000000">
> <?
> $conn = odbc_connect("pruebas_php", "", "");
> $resultado1 = odbc_exec($conn,"SELECT Nombre, Apellido1, Apellido2 FROM
> Personas");
> echo odbc_num_rows($resultado1);
> $cantidad_articulos = 0;
> for
>
($cantidad_articulos=1;$cantidad_articulos<=odbc_num_rows($resultado1);$cant
> idad_articulos++) {
> echo odbc_result($resultado1,2);
> echo odbc_result($resultado1,3);
> echo odbc_result($resultado1,4);
> }
> ?>
>
> </body>
> </html>
>
> Regards
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]