{"id":1078,"date":"2015-01-06T02:41:05","date_gmt":"2015-01-06T10:41:05","guid":{"rendered":"http:\/\/systemsolver.com\/StatlerBlog\/?p=1078"},"modified":"2015-01-06T02:41:05","modified_gmt":"2015-01-06T10:41:05","slug":"civicase-phpmyadmin-set-created_date-data","status":"publish","type":"post","link":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/2015\/01\/06\/civicase-phpmyadmin-set-created_date-data\/","title":{"rendered":"civiCase phpMyAdmin set created_date data"},"content":{"rendered":"<p>In phpMyAdmin, with the civicrm_contacts table, change the created_date type to date (return late and change back to timestamp).<\/p>\n<p>Copy the created_date exported file\u00a0AA-qryCreatedDate.txt into \/home\/tech\/Downloads<\/p>\n<p>Enter the following into the civicrm_contacts sql section<\/p>\n<pre style=\"padding-left: 30px;\">CREATE TEMPORARY TABLE civicrm_contact_temp LIKE civicrm_contact;<\/pre>\n<pre style=\"padding-left: 30px;\">LOAD DATA INFILE '\/home\/tech\/Downloads\/AA-qryCreatedDate.txt'\nINTO TABLE civicrm_contact_temp\nFIELDS TERMINATED BY ','\n(id, created_date);<\/pre>\n<pre style=\"padding-left: 30px;\">UPDATE civicrm_contact\nINNER JOIN civicrm_contact_temp on civicrm_contact_temp.id = civicrm_contact.id\nSET civicrm_contact.created_date = civicrm_contact_temp.created_date;<\/pre>\n<p style=\"padding-left: 30px;\">DROP TEMPORARY TABLE civicrm_contact_temp;<\/p>\n<p>change the created_date type back to timestamp.<\/p>\n<h3>civicrm_note import<\/h3>\n<p>Use a pipe to delimit and don&#8217;t use &#8220;s for text.<\/p>\n<p>\/home\/tech\/Downloads\/AA-qryNotesContacts2.txt<\/p>\n<p>load data infile &#8216;\/home\/tech\/Downloads\/AA-qryNotesContacts2.txt&#8217; into table civicrm_note fields terminated by &#8216;|&#8217; enclosed by &#8221; lines terminated by &#8216;\\n&#8217; (entity_table,entity_id,note,modified_date,Subject,privacy);<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In phpMyAdmin, with the civicrm_contacts table, change the created_date type to date (return late and change back to timestamp). Copy the created_date exported file\u00a0AA-qryCreatedDate.txt into \/home\/tech\/Downloads Enter the following into the civicrm_contacts sql section CREATE TEMPORARY TABLE civicrm_contact_temp LIKE civicrm_contact; LOAD DATA INFILE &#8216;\/home\/tech\/Downloads\/AA-qryCreatedDate.txt&#8217; INTO TABLE civicrm_contact_temp FIELDS TERMINATED BY &#8216;,&#8217; (id, created_date); UPDATE civicrm_contact [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,4],"tags":[],"class_list":["post-1078","post","type-post","status-publish","format-standard","hentry","category-civicrm","category-general"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/posts\/1078","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/comments?post=1078"}],"version-history":[{"count":0,"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/posts\/1078\/revisions"}],"wp:attachment":[{"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/media?parent=1078"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/categories?post=1078"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/tags?post=1078"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}