Re: dbase extension - Contributing Code
| From: | Geoff Jukema | Date: | Tue, 21 May 2002 18:14:32 +0000 |
| Subject: | Re: dbase extension - Contributing Code | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-84240@lists.php.net to get a copy of this message | ||
You'd be suprised how many people are actually using dbase as a common-file
for transferring small chunks of data - this is why I needed to write the
write code for our company.
The dbase_open() and dbase_close() work in the 'buggy' version that reads
memo data. I can add it to the current 'released' version if you think it
should be there.
You are absolutely correct about the fpt vs dbt. We required foxpro files,
so I wrote it to handle those. In the README.MEMO file, it describes what
is needed for handling dbt's, other than actually replaceing the "fpt"
occurrences with "dbt" - I should come up with a nicer way of handling
this - perhaps a constant with an option. Any thoughts here?
So, what I think your saying is that even though I have the
dbase_add_record() completed, before it's committed, I should get the read
support completed? At this point, it could be committed.
Thanks,
Geoff
----- Original Message -----
From: "Vlad Krupin" <vlad@php.net>
To: "Geoff" <gjukema@mvinc.net>
Cc: <php-dev@lists.php.net>
Sent: Tuesday, May 21, 2002 10:28 AM
Subject: Re: [PHP-DEV] dbase extension - Contributing Code
> this would be nice to have - I've written some code for that a while
> back, but never got to finishing or committing it, so it's all abandoned
> now.
>
> I briefly looked at your code and have a couple of comments. First,
> writing to dbase is optional for most people (because it's not safe to
> write from multiple instances of PHP running, and you are just asking
> for trouble that way anyway) but reading from it is, indeed, useful to
> retrieve some legacy data.
>
> for starters, it would be nice to have dbase_open(), dbase_close() (they
> should probably check dbf_dhead.dbh_dbt - see dbf.h - this field already
> gets filled when you do dbase_open() on a file).
>
> ...which brings me to another question - you are using .fpt extension
> for memo files, right? wasn't it .dbt or something like that? I have a
> nagging suspicion that .fpt is what FoxPro decided to use, and everyone
> else uses something else.
>
> after that some read-only support would be nice (dbase_get_record() /
> dbase_get_record_with_names() pair).
>
> after that's ready, we can add some write support, but when it's added
> it would be nice to add changes to dbase_add_record() together with
> changes to dbase_delete_record() and dbase_pack(). It's sad if we can
> add but not delete. I'd rather have read-only access than a handicapped
> write access.
>
> If you submit a unified diff against the HEAD branch to this list,
> chances are someone will add it (as long as it does not obviously break
> things for other people).
>
> Those are just a few thoughts...
>
> Vlad
> --
> Vlad Krupin
> Software Engineer
> echospace.com