Title: microfree's Replies | WordPress.org

---

# microfree

  [  ](https://wordpress.org/support/users/microfree/)

 *   [Profile](https://wordpress.org/support/users/microfree/)
 *   [Topics Started](https://wordpress.org/support/users/microfree/topics/)
 *   [Replies Created](https://wordpress.org/support/users/microfree/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/microfree/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/microfree/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/microfree/engagements/)
 *   [Favorites](https://wordpress.org/support/users/microfree/favorites/)

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Importing data to custom fields – data not showing up on webpage](https://wordpress.org/support/topic/importing-data-to-custom-fields/)
 *  Thread Starter [microfree](https://wordpress.org/support/users/microfree/)
 * (@microfree)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/importing-data-to-custom-fields/#post-2539152)
 * SOLVED!!!!
 * Meta_id ‘s must be CHRONOLOGICAL and CANNOT be arbitrary (i.e. random).
 * data must be inserted into wp_mf_postmeta AND wp_postmeta
 * these records relate to post_id, meta_id and the key-value stores of
    the data
   itself such where key would be “movietitle” and value would be “Die Hard”.
 * I have uploaded the csv I created to do this and create the mysql queries.
    I
   used LibreOffice Calc to finetune the data and Toad for MySQL (by Quest, free)
   to create the MySQL queries…
 * These two records need to be modified for the data to be properly inserted:
    
   NOTE THAT the META_ID MUST be chronological i.e. 11001, 11002 11003 per field
   per post so if meta_key is Movietitle is first then that has meta_id of 11001,
   if productionyear is second then that is 11002 and if country is third then that
   is 11003
 * Also note that for the wp_mf_postmeta the fieldname is the SAME VALUE as meta_key
   
   from wp_postmeta , I.e. the meta key.
 * INSERT INTO `wp_postmeta` (`post_id`,`meta_key`,`meta_value`) VALUES (346,’produksjonsar’,’
   18001′);
 * INSERT INTO wp_mf_post_meta ( meta_id, field_name, field_count, group_count, 
   post_id ) VALUES ( 18001, ‘produksjonsar’ , 1,1 ,346 );
 * The file I have used for this import is available here, if anyone
    needs to see
   an example of how to do this import… Again I used Toad for MySQL to create the
   SQL Queries by using the IMPORT function.
 * * [http://ge.tt/9Q5h4zC](http://ge.tt/9Q5h4zC)
 * This also solves the two questions I posted on Stackoverflow and Stackexchange.
 * [http://wordpress.stackexchange.com/questions/37691/inserting-data-into-magicfields-using-mysql-queries](http://wordpress.stackexchange.com/questions/37691/inserting-data-into-magicfields-using-mysql-queries)
 * [http://stackoverflow.com/questions/8698631/importing-data-into-wordpress-magic-fields-using-mysql-queries](http://stackoverflow.com/questions/8698631/importing-data-into-wordpress-magic-fields-using-mysql-queries)
 * Massive props to Hameedullah Khan Stackexchange, profile here [http://wordpress.stackexchange.com/users/5337/hameedullah-khan](http://wordpress.stackexchange.com/users/5337/hameedullah-khan),
   for basically providing the clue needed to find the solution.

Viewing 1 replies (of 1 total)