Php dbase return misleading column count

293 views Asked by At

I have to convert desktop application to saas

This application storing its data using foxpro ( *.dbf file )

Problem arise when i try to update the row inside the dbf file

It always return me an error: dbase_replace_record(): Wrong number of fields specified

When i run dbase_numfields( $db ), i got 244 fields;

But when i run count( dbase_get_record_with_names( $db, 1 ) ),
It will always return 242 ( missing 2 column )

Is there something that going on that im not aware of while working with *.dbf file?

1

There are 1 answers

3
r wank On

count( dbase_get_record_with_names( $db, 0 ) )

Not 100% sure, but shouldn't you start counting 0,1,2....