Title: SQL Problems
Last modified: August 19, 2016

---

# SQL Problems

 *  [roarjo](https://wordpress.org/support/users/roarjo/)
 * (@roarjo)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/sql-problems-1/)
 * Hi..
 * I have a xoops database, with posts that I want to transfer to wordpress.
    About
   200 posts, all posts have the same author and category.
 * So I do a select like this to populate an empty and fresh wordpress installation.:
 * insert into wp_posts (SELECT storyid AS ID, 1 AS post_author, FROM_UNIXTIME( 
   published ) AS post_date, FROM_UNIXTIME( published ) AS post_date_gmt, bodytext
   AS post_content, title AS post_title, 0 AS post_category, hometext AS post_excerpt,‘
   publish’ AS post_status, ‘closed’ AS comment_status, ‘closed’ AS ping_status,”
   AS post_password, storyid AS post_name, ” AS to_ping, ” AS pinged, FROM_UNIXTIME(
   published ) AS post_modified, FROM_UNIXTIME( published ) AS post_modified_gmt,”
   AS post_content_filtered, “” AS post_parent, ” AS guid, ” AS menu_order, “” AS
   post_type, ” AS post_mime_type, 0 AS comment_count FROM `xoops_stories`)
 * This works fine, no problems running the query. And I can see all the posts in
   the table wp_posts as expected.
 * But from the web GUI in wordpress, there is nothing.
    When I “add new post” from
   the web GUI. That posts appear as normal.
 * Is this not that straight forward or have I forgot something.
    Any relations 
   or something..?
 * Best Regards
 * Roar 🙂

Viewing 1 replies (of 1 total)

 *  Thread Starter [roarjo](https://wordpress.org/support/users/roarjo/)
 * (@roarjo)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/sql-problems-1/#post-985740)
 * Just solved this myself…
 * In my sql statement it says : “” AS post_type,
 * I changed that to : post AS post_type,
 * After changing all post_type to value post, all the posts appear.
    So now everything
   is fine

Viewing 1 replies (of 1 total)

The topic ‘SQL Problems’ is closed to new replies.

## Tags

 * [sql](https://wordpress.org/support/topic-tag/sql/)
 * [wp_posts](https://wordpress.org/support/topic-tag/wp_posts/)
 * [xoops](https://wordpress.org/support/topic-tag/xoops/)

 * In: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
 * 1 reply
 * 1 participant
 * Last reply from: [roarjo](https://wordpress.org/support/users/roarjo/)
 * Last activity: [17 years, 3 months ago](https://wordpress.org/support/topic/sql-problems-1/#post-985740)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
