Jump to content

Sql Request for change groupe customer by Mail.


Blawdi

Recommended Posts

Hello Blawdi,

 

Using this query you can change the group of all customers with ending: @prestashop.com  

UPDATE ps_customer_group as cg INNER JOIN ps_customer as c ON cg.id_customer = c.id_customer  SET  cg.id_group = 1 where c.email  LIKE  "%@prestashop.com"

change the "ps_" with your table prefix and  cg.id_group = 1 also can add your group ID which you want to assign to the customer.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Hello,

Use this query: UPDATE ps_customer_group as cg INNER JOIN ps_customer as c ON cg.id_customer = c.id_customer  SET  cg.id_group = 1 where c.email  LIKE  "%@prestashop.com" AND c.id_default_group = 3

in this time will updated ID group 3 and "prestashop.com"

  • Like 1
  • Thanks 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...