我有一個作爲CSV導出的自定義數據庫。我重新排列了列和數據以匹配Wordpress數據庫的列,因此我可以導入數據。將CSV文件導入到包含html的phpmyadmin中
唯一的問題是自定義數據庫中的一列包含HTML。這會阻止將數據作爲CSV導入Wordpress。有什麼辦法可以解決這個問題嗎?我真的需要保留HTML,因爲我不想再次修改數百行。
需要一段時間才能將數據轉換爲首要操作的格式。
p.s如果我導入沒有HTML列的數據,它將導入到Wordpress中。
下面是一個例子:
ID,post_author,post_date,post_date_gmt,post_content,post_title,post_excerpt,post_status,comment_status,ping_status,post_password,post_name,to_ping,pinged,post_modified,post_modified_gmt,post_content_filtered,post_parent,guid,menu_order,post_type,post_mime_type,comment_count
5000,1,28/02/2012 15:00,28/02/2012 15:00,"<p>Marriott Royal Hotel, College Green, Bristol<br />
<br />
We are pleased to announce the launch of the <a rel=""nofollow"" target=""_blank"" href=""http://www.inets-sw.co.uk/default.aspx?page=495"">Microelectronics iNet</a> for the South West. This £2.3 million ERDF funded project will facilitate innovation and growth across the microelectronics industry by working with businesses to transform exciting ideas into new products and services.</p>
<p>Join us for the opportunity to learn more about the iNet and to hear leading technology entrepreneur Professor David May speaking on future trends and opportunities.</p>
<p>Speaking alongside Professor May will be Rick Chapman, Director of the Microelectronics iNet and Nick Sturge, Director of the SETsquared Business Acceleration Centre in Bristol.</p>
<p>Please register by Friday 26 November.</p>
<p><a rel=""nofollow"" target=""_blank"" href=""http://www.inets-sw.co.uk/micro/events/december_200/ingenious_britain_in_action.aspx"">Further details</a> or <a target=""_blank"" rel=""nofollow"" href=""https://www.formstack.com/forms/inets-launch"">book now</a></p>
<p>About the iNets<br />
The Microelectronics iNet is a consortium of universities, commercial organisations and industry networks. The project is led by the University of the West of England, and includes the University of Bristol, STMicroelectronics, the National Microelectronics Institute and the Electronics, Sensors and Photonics KTN.<br />
<br />
Agenda<br />
16:00 Arrival<br />
16:30 Welcome & Introduction<br />
16:45 Professor David May<br />
17:30 Rick Chapman<br />
17:50 Nick Sturge<br />
18:30 Drinks and canapés</p>
<p>Get updates<br />
<a rel=""nofollow"" target=""_blank"" href=""https://www.formstack.com/forms/inets-mailing_list"">Sign up</a> to receive regular updates from the Microelectronics iNet</p>
<p>Contact Us<br />
0117 32 86690<br />
<a href=""mailto:[email protected]"">[email protected]</a><br />
<a rel=""nofollow"" target=""_blank"" href=""http://www.inets-sw.co.uk/"">http://www.inets-sw.co.uk/</a></p>",Microelectronics iNet Launch,,publish,closed,closed,,,,,11/04/2012 10:04,11/04/2012 10:04,,0,http://www.mediwales.com/v3/?post_type=tribe_events&p=5000,0,tribe_events,,0
你用什麼來進行數據導入?任何應用程序或類似phpMyAdmin .... – 2012-04-11 13:37:54
@SandeepRajoria是的,那正是 - phpmyadmin。 – Rob 2012-04-11 13:39:10
好吧,你將不得不編輯csv來轉義html字符...像php.net/manual/en/function.htmlspecialchars.php或導出數據庫在sql中,如果你可以....因爲我無法找到任何東西在phpMyAdmin中用於您的場景 – 2012-04-11 13:52:09