coding a conversion from MySQL data to flat file

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

coding a conversion from MySQL data to flat file

Post 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
User avatar
Todd_Z
Forum Regular
Posts: 708
Joined: Thu Nov 25, 2004 9:53 pm
Location: U Michigan

Post by Todd_Z »

Around a 54 on the scale of 1 to very hard. Good luck!
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

what about sqlite?
User avatar
phpScott
DevNet Resident
Posts: 1206
Joined: Wed Oct 09, 2002 6:51 pm
Location: Keele, U.K.

Post 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.
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Re: coding a conversion from MySQL data to flat file

Post 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.
Post Reply