We are building a database that needs table(purchaser) to check table(paypal) for a matching telephone number. Table(paypal) has 'purchaser telephone' as PK and table(purchaser) has 'purchaser telephone' as FK. I can insert and see the data in both tables, but running a select query returns an empty result. The format for datasets in both tables is decimal(19,5) to allow for international numbers and a 5 digit extension. We are running innodb. We have also tried it with email addresses and got the same (they are varchar). The queries that return empty are below.
SELECT purchaser telephone FROM purchaser WHERE purchaser telephone = paypal.purchaser telephone SELECT * FROM `paypal` WHERE `payer_email`= 'purchaser.p_email' SELECT * FROM `paypal` WHERE `purchaser telephone` LIKE 'purchaser.purchaser telephone'
Any advice is appreciated! Thanks!