Gossamer Forum
Home : Gossamer Threads Inc. : Custom Modification Jobs :

Re: *LinksSQL 2* How much to convert my text db>MySQL?

Quote Reply
Re: *LinksSQL 2* How much to convert my text db>MySQL? In reply to
Mel, I did as you suggested. The initial .db files are, of course blank. The links.def file

Code:
ID => [0, 'numer', 5, 8, 1, '', ''],
Title => [1, 'alpha', 40, 75, 1, '', ''],
URL => [2, 'alpha', 40, 75, 1, 'http://', '^http|news|mailto|ftp'],
Date => [3, 'date', 15, 15, 1, \&get_date, ''],
Category => [4, 'alpha', 0, 150, 1, '', ''],
Description => [5, 'alpha', '40x3', 500, 0, '', ''],
'Contact Name' => [6, 'alpha', 40, 75, 1, '', ''],
'Contact Email' => [7, 'alpha', 40, 75, 1, '', '.+@.+\..+'],
Hits => [8, 'numer', 10, 10, 1, '0', '\d+'],
isNew => [9, 'alpha', 0, 5, 0, 'No', ''],
isPopular => [10, 'alpha', 0, 5, 0, 'No', ''],
Rating => [11, 'numer', 10, 10, 1, 0, '^[\d\.]+$'],
Votes => [12, 'numer', 10, 10, 1, 0, '^\d+$'],
ReceiveMail => [13, 'alpha', 10, 10, 1, 'Yes', 'No|Yes']
My spider creates 6 output fields, URL|TITLE|DESCRIPTION|KEYWORDS|CATEGORY|EMAIL
Do you think import will work if I append a seventh field |ID to my spider output which it
leaves blank for SQL to autoassign and I rearrange and trim the links.def file to this?

Code:
URL => [0, 'alpha', 40, 75, 1, 'http://', '^http|news|mailto|ftp'],
Title => [1, 'alpha', 40, 75, 1, '', ''],
Description => [2, 'alpha', '40x3', 500, 0, '', ''],
Keywords => [3, 'alpha', '40x3', 500, 0, '', ''],
Category => [4, 'alpha', 0, 150, 1, '', ''],
'Contact Email' => [5, 'alpha', 40, 75, 1, '', '.+@.+\..+'],
ID => [6, 'numer', 5, 8, 1, '', '']
The only reason I do not make ID the first field has to do with entry validation
inside my script. I'd rather not mess with it if I don't have to.

I exported my present category fields corresponding to the fields from the 2.0
category.def file to a file links/admin/tmp/data/categories.db. The only changes it seems
I need make are Meta_Description to 'Meta Description', ditto for Meta_Keywords,
unless you say otherwise. Does the field Related equate to FatherID in SQL?
or can I leave this field blank?

And now the tough questions: The majority of my submissions come in the form
of URL only from Submit Wolf, a VERY POPULAR meta search engine submission
software program. My spider fills in the blanks for TITLE, DESCRIPTION, KEYWORDS
and sometimes EMAIL by capturing them from the pages. Therefore, the majority
of entries will not have a CATEGORY assignment.

1) Will SQL allow me to import those records?
2) If it will, what will happen if a URL is imported without a category assignment that
matches a URL already in the SQL database that has a CatLink relation assigned to it?

I will, of course, back up my existing database and try it anyway but I would feel a lot
better if I knew it's been done and is doable.

Mark Brasche
http://SurfSafely.com/
Subject Author Views Date
Thread *LinksSQL 2* How much to convert my text db>MySQL? HomerUSA 11432 Mar 26, 2001, 1:32 AM
Thread Re: *LinksSQL 2* How much to convert my text db>MySQL?
Paul 11222 Mar 26, 2001, 4:10 AM
Thread Re: *LinksSQL 2* How much to convert my text db>MySQL?
HomerUSA 11233 Mar 26, 2001, 5:03 AM
Thread Re: *LinksSQL 2* How much to convert my text db>MySQL?
Paul 11216 Mar 26, 2001, 5:07 AM
Thread Re: *LinksSQL 2* How much to convert my text db>MySQL?
HomerUSA 11132 Mar 26, 2001, 5:23 AM
Thread Re: *LinksSQL 2* How much to convert my text db>MySQL?
Paul 11147 Mar 26, 2001, 5:29 AM
Thread Re: *LinksSQL 2* How much to convert my text db>MySQL?
surfsafely 11107 Apr 8, 2001, 4:56 PM
Thread Re: *LinksSQL 2* How much to convert my text db>MySQL?
Mel_g 11136 Apr 12, 2001, 12:19 PM
Thread Re: *LinksSQL 2* How much to convert my text db>MySQL?
surfsafely 11014 Apr 12, 2001, 1:34 PM
Post Re: *LinksSQL 2* How much to convert my text db>MySQL?
Stealth 10997 Apr 12, 2001, 2:08 PM
Thread Re: *LinksSQL 2* How much to convert my text db>MySQL?
Mel_g 11056 Apr 12, 2001, 4:12 PM
Post Re: *LinksSQL 2* How much to convert my text db>MySQL?
surfsafely 10982 Apr 12, 2001, 4:27 PM
Thread Re: *LinksSQL 2* How much to convert my text db>MySQL?
surfsafely 11047 Apr 12, 2001, 6:07 PM
Post Re: *LinksSQL 2* How much to convert my text db>MySQL?
surfsafely 10904 Apr 14, 2001, 5:51 PM
Thread Re: *LinksSQL 2* How much to convert my text db>MySQL?
Mel_g 10935 Apr 17, 2001, 8:59 AM
Post Re: *LinksSQL 2* How much to convert my text db>MySQL?
surfsafely 10913 Apr 17, 2001, 12:17 PM
Thread Re: *LinksSQL 2* How much to convert my text db>MySQL?
surfsafely 10913 Apr 17, 2001, 1:26 PM
Thread Re: *LinksSQL 2* How much to convert my text db>MySQL?
Alex 10935 Apr 18, 2001, 3:39 PM
Post Re: *LinksSQL 2* How much to convert my text db>MySQL?
surfsafely 10824 Apr 18, 2001, 4:57 PM
Post Re: *LinksSQL 2* How much to convert my text db>MySQL?
surfsafely 10795 Apr 18, 2001, 9:07 PM