Page 1 of 1
coding a conversion from MySQL data to flat file
Posted: Tue May 10, 2005 2:43 pm
by malcolmboston
In hindsight of this topic
here i was wondering how hard do you guys think writing a piece of code that when run, would convert your MySQL database into a Text File Based system and getting it fully working (accounting for differences in DB/tables/rows etc) as i may need to code this v-soon.
Thanks
Posted: Tue May 10, 2005 3:03 pm
by Todd_Z
Around a 54 on the scale of 1 to very hard. Good luck!
Posted: Tue May 10, 2005 4:16 pm
by timvw
what about sqlite?
Posted: Tue May 10, 2005 4:17 pm
by phpScott
depends what you mean for getting it fully running.
your code will have to change dramatically to run with the file instead of the db.
otherwise why don't you export as a csv file.
Re: coding a conversion from MySQL data to flat file
Posted: Tue May 10, 2005 4:42 pm
by Roja
malcolmboston wrote:In hindsight of this topic
here i was wondering how hard do you guys think writing a piece of code that when run, would convert your MySQL database into a Text File Based system and getting it fully working (accounting for differences in DB/tables/rows etc) as i may need to code this v-soon.
Thanks
You can use
adodb for database abstraction, which supports sqlite, and then its just a matter of rewriting queries that don't specifically work on sqlite.
As to how much work it is, it depends on the complexity, number of db calls, and a dozen other factors. One game I recently ported to adodb took (literally) *one day*. But that was because they already had their own db-abstraction layer, so it was fairly straightfoward.