Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help from Costumer Group


aplein

Recommended Posts

Hello, my English is not the best. Sorry.

 

Hello,

Customer put on groups 1 private 2 retailers now I would like to have indicated all customers some company name by sql code everything to be at once changed over. It does not only give the field to company in customers the table. The company (company) is put down only in the directory under entry_company. Can someone say as I that to me to make can that all firm customers to retailers be changed over now? If I for example all customers in customer group 2 to have would like can I that in such a way make UPDATE `customers `SET `customers_groups_id `= ?2? Only like Mach I only the companies customers in group 2 come now? UPDATE `customers `SET `customers_groups_id `= ?2? resists entry_company It does not make that so however, since no numbers separate words there are deposited. Does someone have one taps or code for it?

Greetings Alfred

 

 

in German:

 

Hallo,

 

Habe Kunden Gruppen angelegt

1 Privat

2 Wiederverk?ufer

 

jetzt m?chte ich das alle Kunden die einen Firmennamen angegeben haben per sql code alle auf einmal umgestellt werden. Nur gibt es das Feld Firma nicht in der customers tabelle.

Die Firma (company) wird nur im Adressbuch unter entry_company abgelegt.

 

Kann mir jemand sagen wie ich das machen kann das jetzt alle Firmenkunden auf Wiederverk?ufer umgestellt werden?

 

Wenn ich zum Beispiel alle Kunden in Kunden Gruppe 2 haben m?chte kann ich das ja so machen

 

UPDATE `customers` SET `customers_groups_id` = '2'

 

Nur wie mach ich jetzt das nur die Firmen Kunden in Gruppe 2 kommen?

 

UPDATE `customers` SET `customers_groups_id` = '2' wehre entry_company

Das macht er so aber nicht, da dort ja keine Ziffern sondern W?rter hinterlegt sind.

 

Hat jemand einen Tipp oder Code daf?r?

 

Gr??e

Alfred

Link to comment
Share on other sites

UPDATE `customers `SET `customers_groups_id `= ?2? resists entry_company It does not make that so however, since no numbers separate words there are deposited. Does someone have one taps or code for it?

 

Nur wie mach ich jetzt das nur die Firmen Kunden in Gruppe 2 kommen?

I think the SPPC thread would have been a more approriate place for this question by the way.

 

I think this works, but first try the first query and if it seems to work OK (only selects Wiederverk?ufer) use the update statement.

select entry_company, c.customers_id from customers c, address_book ab where c.customers_id = ab.customers_id and entry_company is not null and entry_company <> '';

update customers c, address_book ab set customers_group_id = '2' where c.customers_id = ab.customers_id and entry_company is not null and entry_company <> '';

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...