|
|
|
05-08-1999, 03:19 PM
|
Postid: 42543
|
|
Visitor
Join Date: Jan 1999
Location: Kissimmee, FL
Posts: 3,672
|
I'm pretty sure that's all installed. I installed WWWThreads, which is Perl/MySQL, and it worked first time without a hitch even though the instructios said to install a million things first - all was already here  You'll find that a lot here though
I personally prefer PHP with MySQL. PHP was written strictly as a web based scripting language - I don't think that is Perl's primary intended use, although it is extremely popular for it - but PHP takes care of content headers, has built in functions for printing additional headers, setting cookies, etc. It also automatically converts GET, POST, and cookie variables - it does 90% of the work for you  And it's integration with MySQL is totally seamless...
But that's me  I just really like php for some reason...
------------------
Justin Nelson
FutureQuest Support
|
|
|
05-08-1999, 03:36 PM
|
Postid: 42544
|
|
Registered User
Join Date: May 1999
Location: Washington, DC, USA
Posts: 86
|
Thanks for your replies, Justin. I appreciate you helping me get up to speed quickly.
I have fixed-length fields in the flat-text database, so wouldn't that necessitate a lot of text processing to get the import function to work properly (it appears that the function requires delimiting)? Further, the flat-text tables have dates in YYYYMMDD. Wouldn't this require a lot of text processing?
|
|
|
05-08-1999, 09:55 PM
|
Postid: 42545
|
|
CTO FutureQuest, Inc.
Join Date: Jun 1998
Location: Z'ha'dum
Posts: 7,672
|
Just write an import massager in Perl using the DBD:  BI (fought with them for a week compiling/testing/installing them into the FQuest core)...
DBD:  BI is fully functional...
You will definitely have to make sure that your Time/Date input from your files is reworked for DATETIME field injection compatability... I usually just create a regex to pick it apart and sprintf() to the desired format...
One day I will have to write an FQuest installed Perl Module lister, because I have TONS of modules installed... (FEEL the power of cpan)
I usually check my installed core every 2 weeks and run updates/upgrades as needed...
--
Terra
--Member of the Bonified Perl Module fanatics club--
FutureQuest
|
|
|
05-08-1999, 11:09 PM
|
Postid: 42546
|
|
Registered User
Join Date: May 1999
Location: Washington, DC, USA
Posts: 86
|
Thanks Terra! Very informative.
On third thought, I might just skip DBD  BI. As you say, the regular expressions of perl are extremely powerful. Might take a couple of extra minutes, since I'll be gulping >25MB of text. But that's what we have your fast servers for!  Once this is done, I will be able to use the load function to get it into MySQL.
Also thanks for the lwpcook man, which you mentioned some 5 months ago in a post. I just used the large file code snippet to fetch 4 zips.
Once I add that to my crontab, I'll be well on my way!
|
|
|
05-08-1999, 11:12 PM
|
Postid: 42547
|
|
Registered User
Join Date: May 1999
Location: Washington, DC, USA
Posts: 86
|
Oops. If I don't use DBD  BI, there will be an extra step. So, on fourth thought...
|
|
|
05-09-1999, 12:29 AM
|
Postid: 42539
|
|
Registered User
Join Date: May 1999
Location: Washington, DC, USA
Posts: 86
|
Perl Script To Convert Flat-Text To MySQL
In a far off thread somebody said...
"Perl! Perl's text handling capabilities are great to begin with, so a flat text database will work well. Then, when you're ready to move on to a database (I'm assuming mySQL), it shouldn't be very hard to whip up a small Perl script that would take the info from the text database, and dump it into a mySQL table (if you know anything about mySQL anyway, I sure don't... (I still don't wanna wait til May for the book))"
Has anybody written a script such as this yet? I will probably integrate it into a perl script that drops a current MySQL database, lwps to a remote site, downloads about 20 zipped flat-text files, unzips them, converts them to MySQL tables in a newly created database, and creates appropriate indices.
Any ideas?
|
|
|
05-09-1999, 12:42 AM
|
Postid: 42540
|
|
Registered User
Join Date: May 1999
Location: Washington, DC, USA
Posts: 86
|
Aggghhh! I'm becomin a nuisance to myself and others by answering my own questions...
The answer has to do with the mysqlimport executable. I'll have to figure out all of the options.
|
|
|
05-09-1999, 12:44 AM
|
Postid: 42541
|
|
Visitor
Join Date: Jan 1999
Location: Kissimmee, FL
Posts: 3,672
|
I don't know if anyone has written a script for that yet, but you might be confused - you only get one database... you can't drop and create databases (actually you could drop your database but cannot create one - so be careful  )
You can create all the tables you want to, but can't create databases. You will only have one, with the name being xdomainname... it seems limited, but as long as you name your tables properly there shouldn't be any problems
Just wanted to let you know before you end up fighting with a script trying to figure out why you can't create a database (or before you dropped your database...).
------------------
Justin Nelson
FutureQuest Support
|
|
|
05-09-1999, 12:56 AM
|
Postid: 42542
|
|
Registered User
Join Date: May 1999
Location: Washington, DC, USA
Posts: 86
|
Thanks Justin! That would have indeed been a problem. But I can delete and create tables from the script, no?
In a way, I'm inclined to go with DBD  BI rather than working through PHP. Any suggestions either way? Do the servers have the DBD  BI module loaded? How about mysql.pm?
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 visitors)
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 05:51 PM.
|
| |
|
|
|