One of the questions people have had is how to import data into Links. MySQL has a LOAD command that takes care of that. The basic syntax for a Links 2.0 import file would be:
[REPLACE|IGNORE] INTO TABLE Links.Table
FIELDS TERMINATED BY '|'
(comma,separated,list,of,fields,you,are,importing)
;
REPLACE will over write the existing data, IGNORE will ignore the new values and keep the old.
The [LOCAL] parameter is necessary if you are on a remote machine, and doesn't hurt if you aren't.
There are other delimiters for enclosing fields and ending lines, the defaults work fine for Links 2.0 no ' or " in string fields only | as field terminator.
Hope this helps someone.
------------------
POSTCARDS.COM -- Everything Postcards on the Internet www.postcards.com
LinkSQL FAQ: www.postcards.com/FAQ/LinkSQL/
Code:
LOAD DATA [LOCAL] INFILE '/full/path/to/file' [REPLACE|IGNORE] INTO TABLE Links.Table
FIELDS TERMINATED BY '|'
(comma,separated,list,of,fields,you,are,importing)
;
REPLACE will over write the existing data, IGNORE will ignore the new values and keep the old.
The [LOCAL] parameter is necessary if you are on a remote machine, and doesn't hurt if you aren't.
There are other delimiters for enclosing fields and ending lines, the defaults work fine for Links 2.0 no ' or " in string fields only | as field terminator.
Hope this helps someone.
------------------
POSTCARDS.COM -- Everything Postcards on the Internet www.postcards.com
LinkSQL FAQ: www.postcards.com/FAQ/LinkSQL/