• Welcome to KonaKart Community Forum. Please login or sign up.
 

Problem insert customer, duplicate email.

Started by ejaen, October 30, 2009, 08:32:24 am

Previous topic - Next topic

ejaen

Hi, how do u do.
I have a problem when I try to insert a customer with email paco_joyero@hotmail.com because the app say me that the customer already exist in database.(Internal error. A customer with email address = paco_joyero@hotmail.com should not exist at this point in the method. Contact KonaKart support.)
I think's that the problem is because the app, look if the customer with this email exist like:

mysql> SELECT count(*)  FROM customers WHERE customers.customers_email_address LIKE '%paco_joyero@hotmail.com%';
+----------+
| count(*) |
+----------+
|        1 |
+----------+
1 row in set (0.01 sec)

But this email already not exist in database


mysql> SELECT customers.customers_email_address  FROM customers WHERE customers.customers_email_address LIKE '%paco_joyero@hotmail.com%';
+-------------------------+
| customers_email_address |
+-------------------------+
| paco.joyero@hotmail.com |
+-------------------------+
1 row in set (0.00 sec)

The query return other mail "paco.joyero@hotmail.com" , and the insert fail.
Please, can u help me? I'm lookig for a mysql bug in google and forum but i can't find nothing.

MySQL Version:mysqladmin  Ver 8.41 Distrib 5.0.51a, for debian-linux-gnu on i486

Thk's in advance
Emilio.

ejaen

Hi,
the problem seem's that the "_" character is a especial character to mysql, is not a bug.
http://dev.mysql.com/doc/refman/5.0/en/pattern-matching.html
And then , the problem is konakart make a "like" query to determine if the email exist's in database.
I use Konakart 3.2 version.
I'm wrong?
Thk's in advance

greg

You are right that a like query is done there. 

This is not the case from the store-front application we provide where an equals query is executed... so you can always create your customers that way when you have a clash with the like query.

The code has been modified for the next release but there are a few workarounds you can use including:


  • use the application (rather than the Admin App)

  • set "Add wildcard search before text" and "Add wildcard search after text" to false in the "Admin App Configuration" configuration section of the Admin App.   This will allow you to insert the customer OK - even with the LIKE query, but you will have to enter "%" into the search fields to retrieve customers from that panel when operating in this mode.



ejaen

Hi, thk's for u answer
I use admin app because  we make  a script to load customers and i think that i must use admin app in "batch" mode.
I change my script to use app and register customer.
Thk's for u time greg.