我还插入了客户使用的 sql 脚本。我使用excel来准备sql脚本。首先,我将数据分成 17 个不同的选项卡,后来我为最多 1000 条记录准备了 sql。即使我使用 sql 脚本输入数据,我也会遇到大于 1000 条记录的数据问题。
这是一个示例 sql
插入ps_customer
( active
, id_gender
, email
, passwd
, lastname
, firstname
, newsletter
, optin
) 值 (1,9, "email@yahoo.com", MD5(CONCAT('cookiekeycookiekeycookiekey','password')),"surname","name",1,1 );
稍后您应该运行下面的脚本,否则您将无法登录
INSERT INTO ps_customer_group
(id_customer,id_group) SELECT id_customer,3 FROM ps_customer WHERE id_customer NOT IN (SELECT id_customer FROM ps_customer_group
)
在我现有的数据中,我在同一张表中有地址,但在 prestashop 中,地址存储在另一个表中。我准备了下面的sql来使用地址表中的customerid。
插入ps_address
( id_customer
, id_country
, id_state
, alias
, company
, lastname
, firstname
, address1
, postcode
, city
, phone
, phone_mobile
, vat_number
) 值
(( SELECT id_customer
FROM ps_customer
WHERE email
= "email@hotmail.com" ), 211 , 0 , " Adres1 "," "," Surname "," Name " ,"地址详细信息","10000","伊斯坦布尔","tel1","移动电话",""));
那一切...
费尔达