Page 2 of 2
Posted: Sun Aug 27, 2006 7:39 pm
by feyd
I'd suggest looking through raghavan20's posts in regex/databases .. I remember several threads on extracting the individual queries in a dump file for insertion that I was involved in. They might be linked from Useful Posts, but I can't recall that specificly.
Posted: Sun Aug 27, 2006 9:38 pm
by RobertGonzalez
I'm telling ya, the phpBB install script is worth a look. It is really easy to see what is going on and just about as easy to implement.
Files to look at...
/includes/sql_parse.php
/install/install.php
/install/schemas/mysql_basic.sql
/install/schemas/mysql_schema.sql
Posted: Mon Aug 28, 2006 1:15 am
by dibyendrah
The best and easy way to read the mysql dump is with phpmyadmin from control panel of the website. Otherwise you should tell the hosting company to enable execution of binaries for limited programs ...
Cheers,
Dibyendra
Posted: Mon Aug 28, 2006 3:49 am
by AlexC
AlexC_ do you have control of install/stage3/tables.sql, if you do why not change it to install/stage3/table.sql.php and put each separate query as a separate element of an array?
Of course I do, It's my CMS I'm coding! hehe- that's not a bad idea actaully and it would be better than XML
What do you mean with 'XML would be the best way'? And what would be the dtd/xsd of the xml file?
I was thinking of putting each query in the XML document then parsing it and running each query - might not be a good idea actaully
How about looking at phpBB's installation code then. phpMyAdmin is a bit rough, but phpBB code might be a little easier to read through.
I'll have a look at that, thanks
Posted: Mon Aug 28, 2006 3:51 am
by AlexC
dibyendrah, I can't do that - My CMS install needs to "Just work" without the Average Joe contacting his hosting company to enable something.
Posted: Mon Aug 28, 2006 6:32 am
by Ollie Saunders
Of course I do, It's my CMS I'm coding! hehe- that's not a bad idea actaully and it would be better than XML
There's your solution then.
Posted: Mon Aug 28, 2006 7:30 am
by AlexC
Well I've been looking through the phpBB source code and I can actually understand it! I'm going to implement it into my Install now

Posted: Mon Aug 28, 2006 8:59 am
by RobertGonzalez
Good job Alex. Let us know if things go wonky.
Posted: Mon Aug 28, 2006 9:00 am
by AlexC
Yep, it works and it works well!
Thanks a lot everyone for your help
