microfree
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Importing data to custom fields – data not showing up on webpageSOLVED!!!!
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 11003Also 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.This also solves the two questions I posted on Stackoverflow and Stackexchange.
Massive props to Hameedullah Khan Stackexchange, profile here http://wordpress.stackexchange.com/users/5337/hameedullah-khan , for basically providing the clue needed to find the solution.