FutureQuest, Inc. FutureQuest, Inc. FutureQuest, Inc.

FutureQuest, Inc.
Go Back   FutureQuest Community > General Site Owner Support (All may read/respond) > General Coding/Development
User Name
Password  Lost PW

Reply
 
Thread Tools Search this Thread Display Modes
Old 09-03-2000, 04:25 PM   Postid: 21329
jbroder
Site Owner

Forum Notability:
10 pts: User-friendly
[Post Feedback]
 
Join Date: Dec 1998
Location: oakland, ca, usa
Posts: 138
convert site: perl/file to php/mysql


I am planning to convert my perl/ssi site with over 1000 html pages to a php/mysql site. So, I have to parse all these files and put the data into tables on the database.
What I need is write a script to parse files and then put them into the mysql database.

I have used perl for file access and regex parsing alot. I have used php for mysql access alot.

I can't decide which language to use. Should I use perl to get the most of its regex function and learn the perl database connectivity part? Or should I use php for its database function and learn its file access methods?

Thanks for any help.

Jon
------------------
guitartricks.com
jbroder is offline   Reply With Quote
Old 09-03-2000, 07:27 PM   Postid: 21330
Hunkorama417
Site Owner

Forum Notability:
10 pts: User-friendly
[Post Feedback]
 
Join Date: Nov 1999
Posts: 283
PHP can handle Perl based regex using preg() [I think it's preg() or either preg_replace()]. I tend to lean more to PHP, but Perl can be very nice indeed. If I were you I'd use Perl and the DBI module to interact w/ mySQL.
------------------
Andrew
www.digi-FX.net
Hunkorama417 is offline   Reply With Quote
Old 09-03-2000, 07:29 PM   Postid: 21331
Stephen
Site Owner
 
Stephen's Avatar

Forum Notability:
89 pts: Helpful Contributor
[Post Feedback]
 
Join Date: Feb 1999
Location: L.A.
Posts: 671
this thread might help you decide whether to use perl:

http://www.aota.net/ubb/Forum15/HTML/000467-1.html

------------------
Stephen Carter, Random Mouse Software
Putting Customer Reviews On Your Site
U R L:  www.randommouse.com
Stephen is offline   Reply With Quote
Old 09-07-2000, 02:54 AM   Postid: 21332
thalcor
Registered User

Forum Notability:
10 pts: User-friendly
[Post Feedback]
 
Join Date: Sep 2000
Location: Houston, TX USA
Posts: 13
You can use both Perl and PHP to access your MySQL database.  Convert your data files to MySQL and then using then port your existing Perl code using the Perl DBI/DBD.  Same with the PHP code.  Should be easy to accomplish.
thalcor is offline   Reply With Quote
Old 09-07-2000, 03:33 AM   Postid: 21333
sumengen
Visitor
 
sumengen's Avatar

Forum Notability:
0 pts:
[Post Feedback]
 
Join Date: Mar 2000
Posts: 127
Unless you have a very good reason, there is no need to convert your perl scripts to a limited and painful language like php.
DBI (perl's database connectivity) is nothing complex. Just couple of functions. The challenge is to master sql and mysql. It looks like you are already familiar with mysql, so you can just add 2-3 lines of more perl code to your program and that's it.
sumengen is offline   Reply With Quote
Old 09-07-2000, 03:55 AM   Postid: 21334
jbroder
Site Owner

Forum Notability:
10 pts: User-friendly
[Post Feedback]
 
Join Date: Dec 1998
Location: oakland, ca, usa
Posts: 138
Thanks for all the responses. It seems the consensus is that learning Perl DBI will be my best bet for the file to database conversion. Can anyone recommend a good web site or book that explains DBI? 
jbroder is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 visitors)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 02:43 AM.


Running on vBulletin®
Copyright © 2000 - 2013, Jelsoft Enterprises Ltd.
Hosted & Administrated by FutureQuest, Inc.
Images & content copyright © 1998-2013 FutureQuest, Inc.
FutureQuest, Inc.