Latest Register Log In

+ Advanced Search

Generic MySQL Imports

Generic MySQL Imports
11/29/03 (Edited 02/29/16)

To import to WSN from any mysql table you can use one of these processes:

Via CSV, For Listings or Categories

1) Using phpmyadmin (which is under your web hosting control panel in the mysql section), navigate to the database table you want to import.
2) Use the export tab to export the data as a CSV file. Set it to terminate fields with , (a comma) instead of the default ; (semicolon).
3) In WSN, go to Admin -> Listings -> Add Listings -> "CSV/TSV Import", upload your CSV file, and select what each field means. Run the import. If you get an out of memory or timeout error, you'll need to either increase the memory and time limits in php.ini or split the CSV file into several smaller files before uploading.
4) In WSN, go to Admin Panel -> Maintenance -> Regenerate Counters and select to regenerate everything.

Direct, For Any Table Type

1) Using phpmyadmin, alter the names of each field of your old data table to match the equivilant WSN field names. Set all fields to NOT NULL as well.
2) Remove any extraneous left-over fields.
3) Export the data from this with complete inserts.
4) Import this data to your WSN table.
5) If this is the listings table, run the following queries to set appropriate values to fields to make the listings all visible and give them a submission time if you can't convert your source data's times to unix timestamps. Be sure to replace wsn_ with the table prefix you're using for this installation!
UPDATE wsn_links SET validated=1;
UPDATE wsn_links SET type='regular';
UPDATE wsn_links SET validatedemail=1;
UPDATE wsn_links SET active=1;
UPDATE wsn_links SET timevalidated=UNIX_TIMESTAMP();
6) If this is the listings table and your source data didn't have a category id value or you haven't created WSN categories with those ids, then you can use this query to put all the listings into category #1: UPDATE wsn_links SET catid=1;
7) In WSN, g
o to Admin Panel -> Maintenance -> Regenerate Counters and select to regenerate everything.

If you can't import your database, you can hire database import service at the standard WSN services rate (see the site's services section).

Description Possible procedures for moving your existing knowledge base to WSN.
Views 3121 views. Averaging 1 view per day.