Re: Query with Access
| From: | Gary Huntress | Date: | Sun, 01 Apr 2001 15:09:50 +0000 |
| Subject: | Re: Query with Access | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-8091@lists.php.net to get a copy of this message | ||
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"" <buitrago_fernando@hotmail.com> wrote in message
news:9a6l42$e5r$1@toye.p.sourceforge.net...
> 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: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>