I don't really know anything about dbase.  But don't you need to tell it
which tables and fields you wish to retrieve?

Regards,

[ lucas ]




"Alejandro Viana" <[EMAIL PROTECTED]> wrote in message
001e01c15ec9$d3d566a0$9db2243e@miordenador">news:001e01c15ec9$d3d566a0$9db2243e@miordenador...
I'm trying to read a record from a dbase data base so I've previously
opened it successfully. The problem is that I call the function
dbase_get_record, but it returns no records. The database is ok because I
call the funcion dbase_numfields and dbase_numrecords and they give me
correct information. Would you help me, please?. Here is the source code
that fails.

[EMAIL PROTECTED]


Estoy intentando leer un registro de una base de datos dbase, por lo que
antes la he abierto con éxito. el problema residen en que llamo a la función
dbase_get_record, pero no me devuelve ningún registro. La base de datos está
bien, porque llamo a la función dbase_numfields y dbase_numrecords y me dan
información correcta. ¿Me podríais ayudar, por favor?. Ahí va el código
fuente:

[EMAIL PROTECTED]



Source code- Código fuente:

<?
$based="articulo.dbf";
if (($descriptor=dbase_open ($based, 0))==0){
   printf ("<br>Error al abrir la base de datos");
}else{
   printf ("<br>Base de datos abierta");
   $num_registros=dbase_numrecords($descriptor);
   $num_campos=dbase_numfields($descriptor);
   for ($i=1;$i<=$num_registros;$i++){
      $registro= dbase_get_record ($descriptor, $i);
      for ($j=0;$j<$num_campos;$j++){
 printf ("<br>Fila %d,Campo %d vale %S", $i, $j, $registro[$j]);
      }
   }
   dbase_close($descriptor);
   printf ("<br>Base de datos cerrada");
}
?>












-- 
PHP General 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]

Reply via email to