php - Iterating through a large db -
i tried using php 5.3 dbase extension, doesn't work reliably large databases on 2 gb. need way iterate through subsection of large dbf , have ability read/edit fields. can done (i use windows)?
first attempt:
table = dbf.table('myhugedbf.dbf') #is way access dbf data? #i need last 10k records opposed whole 4.5 gb beast table.open() in xrange(len(table)-10000, len(table)): table[i].desc = (table[i].desc).replace("\n","") print "*" + str(table[i].desc) + "*" #for debug purposes
table = dbf.table('myhugedbf.dbf') # way access dbf data? # yes. above reads header, though, can basic # info dbf (size, field names, etc.) table.open() # creates data structure 1 (small) element per record record in table[-10000:]: record: record.desc = record.desc.replace('\n','')
Comments
Post a Comment