Jump to content

Recommended Posts

Hi everybody.

 

I have some data in database, i need to create/update file when i update the database by submitting the form

1) the file must contain all the content in database

2) each time i generate or update the record, it must update(or rewrite on the file all the record + new record)

 

any idea?   

Link to comment
https://forums.phpfreaks.com/topic/199285-database-to-file/
Share on other sites

Don't use the file?

 

Sounds extremely pointless, unefficient and did I mention pointless?

 

If you want the file, instead of "updating" the file, just re-create the file from the data in the database. It will probably take just a long (depending on how much data) as it would be to open the file, traverse to the correct record, pull out that record modify it then read in the file and replace that record in the file and write it back to the harddrive.

 

if you must do that for some weird and pointless requirement, just re-create the file each time, in my opinion.

Link to comment
https://forums.phpfreaks.com/topic/199285-database-to-file/#findComment-1046044
Share on other sites

Don't use the file?

 

Sounds extremely pointless, unefficient and did I mention pointless?

 

If you want the file, instead of "updating" the file, just re-create the file from the data in the database. It will probably take just a long (depending on how much data) as it would be to open the file, traverse to the correct record, pull out that record modify it then read in the file and replace that record in the file and write it back to the harddrive.

 

if you must do that for some weird and pointless requirement, just re-create the file each time, in my opinion.

 

hi,

i dont know how to do that! this is the problem, i have never made such this requirement

Link to comment
https://forums.phpfreaks.com/topic/199285-database-to-file/#findComment-1046047
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.