Re: [PHP-DB] Help! ¡Ayuda!
> > > Source code- CÛdigo fuente: > > $based="articulo.dbf"; > if (($descriptor=dbase_open ($based, 0))==0){ >printf ("Error al abrir la base de datos"); > }else{ >printf ("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 ("Fila %d,Campo %d vale %S", $i, $j, $registro[$j]); Try using a lower-case '%s' here -^ I don't think the uppercase %S means anything to printf. > } >} >dbase_close($descriptor); >printf ("Base de datos cerrada"); > } > ?> > Don't know much about dbase, but the rest looks okay. -Steve -- 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-DB] Help! ¡Ayuda!
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: Error al abrir la base de datos"); }else{ printf ("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 ("Fila %d,Campo %d vale %S", $i, $j, $registro[$j]); } } dbase_close($descriptor); printf ("Base de datos cerrada"); } ?> -- 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]
Re: [PHP-DB] Help!!!!!! ¡¡¡¡¡¡¡Ayuda!!!!!!
Look for extensions in the file php.ini. uncomment the line: extension=php_dbase.so (for linux or) extension=php_dbase.dll (for windows) remember to set extension_dir to directory where you have the file. Hope it helps. Bruno Gimenes Pereti. > I need to open a dbase file, so I use the "dbase_open" function and then I > compile it but it tells me > > Fatal error: Call to undefined function: dbase_open() > > it seems like this function does not exists!.Does anybody could help me? > Thanks -- 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-DB] Help!!!!!! ¡¡¡¡¡¡¡Ayuda!!!!!!
I need to open a dbase file, so I use the "dbase_open" function and then I compile it but it tells me Fatal error: Call to undefined function: dbase_open() it seems like this function does not exists!.Does anybody could help me? Thanks --- Necesito abrir una base de datos dbase, por lo que uso la función "dbase_open" y al compilar, me sale el error: Fatal error: Call to undefined function: dbase_open() Parece como si la función no existiera. ¿¿Puede alguien ayudarme?? ¡¡Es muy urgente!!Gracias -- 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]