1

'm filtering records from 2 tables users and temp_bach_users_registeration on the base of email both have some same emails but in query record is null but when i individually search from both they show me records

in temp_bach_users_registeration table i import records from CSV is there this issue is because of csv ??

Query:

SELECT
users.email,
temp_bach_users_registeration.email
FROM
users, temp_bach_users_registeration 
WHERE users.email = temp_bach_users_registeration.email

users table is MyISAM and temp_bach_users_registeration is InnoDB storage engine .

DB Structure of users table : enter image description here ........ enter image description here

DB Structure of temp_bach_users_registeration table : enter image description here .......... enter image description here

can somebody help me to figure out this issue .

thanks .

Cœur
  • 37,241
  • 25
  • 195
  • 267
Haseeb
  • 2,214
  • 1
  • 22
  • 43

2 Answers2

1

finally i got the issue. there is \r in end of value of column emails in temp_bach_users_registeration table but it not shows in phpMyadmin .

i find this by searching again with this query .

SELECT *
FROM `temp_bach_users_registeration`
WHERE `email` IN('test@yahoo.com\r')
LIMIT 0, 1000

and got the records.

Haseeb
  • 2,214
  • 1
  • 22
  • 43
0

try in this way

SELECT
users.email,
temp_bach_users_registeration.email
FROM
users, temp_bach_users_registeration 
WHERE trim(users.email) = trim(temp_bach_users_registeration.email)
Gianluca Colombo
  • 717
  • 17
  • 38