Manual import of records

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
Daruka
Posts: 1
Joined: Fri May 19, 2006 1:36 am

Manual import of records

Post by Daruka »

Hi all! I searched through the forums but did not quite see anything related to this. So pardon me if I missed it somewhere.

My goal is to import records from a home-grown application we built for our FAQ system. I would like to know what tables need to be inserted into for this process to work.

It looks like I can insert new records in the "faqdata" table if I craft the correct base query using an existing author. Are there other tables that need to be updated for this to work? I realize I will also have to assign a unique ID to avoid duplicates. Anything else I might be missing?

Thanks for your help!
-Daruka
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

you need to fill the tables faqcategories and faqcategoryrelations, too.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
os4me
Posts: 18
Joined: Fri Jul 28, 2006 8:27 pm

Post by os4me »

I imported records from my old faq system into pgpMyFAQ and everything seems to work fine except I don't see my entries under Edit Records in the admin section.

Any ideas?

Thanks
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

which tables did you filled? Could you please post an example here how you did it?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
os4me
Posts: 18
Joined: Fri Jul 28, 2006 8:27 pm

Post by os4me »

I loaded each of the following tables.

faqcategories
faqcategoryrelations
faqdata

The site works fine just the admin section seems not to be able to see the imported records.

Thanks
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

can you post the entries for record 1 and category 1?

Thanks!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
os4me
Posts: 18
Joined: Fri Jul 28, 2006 8:27 pm

Post by os4me »

See PM for details.
os4me
Posts: 18
Joined: Fri Jul 28, 2006 8:27 pm

Post by os4me »

Problem solved. There were some hidden fields in the datum column that were imported in error. Once removed the records starting showing correctly.
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

okay...

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Bucketworks
Posts: 2
Joined: Tue Sep 18, 2007 6:35 pm

Is this truly all there is to it?

Post by Bucketworks »

I did a manual import of a word doc into the database. I converted the text into insert statements. I added a faqcategory and faqcategoryrelation for each record, and inserted the records into faqdata. However, they do not show up in the 'public' view but do show up under 'admin' view.

Here is an example for a row:

insert into faqdata (id, lang, solution_id, revision_id, active, thema, content, author, email, datum, links_state, links_check_date, date_start, date_end) values (\1\2\3, "en", \1\2\30, 0, 'yes',"\4","\5","JSC", "myemail@notanaddress.com", "20070815120130", "linkok", "1188493290", "00010101000000", "99991231235959");

The \1\2\3 are regexp replacement expressions, but were replaced with numbers. \4 and \5 were the question and content.

What else do I have to do to make these entries show up? Do I need to create a record in the revisions table? I'm running 2.0.3.
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

you need the relation entries in faqcategoryrelations, faqcategory_user, faqcategory_group, faqdata_user and faqdata_group.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Bucketworks
Posts: 2
Joined: Tue Sep 18, 2007 6:35 pm

What does -1 mean in faqcategory_user or _group?

Post by Bucketworks »

Does that mean "any user" or "any group" if found in those two tables in the respective field for user or group (not category id?)
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

yes... if everyone can see the entry, then add a -1 for the user and group id.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply