0

Bit of a strange one, I have a table where I am comparing two strings: desc_new and desc_old.

desc_old is my old data from another database and desc_new is newly pulled data from an online source via PHP.

When inserting from php I did the following:

$description = trim(strip_tags($description));

The data itself looks identical: enter image description here

However, when I run the following query:

SELECT * FROM `update_desc` WHERE desc_new != desc_old

It returns this row. I'm suspecting there are some hidden characters but I can't for the life of me find out what it is.

I've done a mysql trim on both columns to no avail.

If I do a STRCMP on them both it returns 1 which means desc_old is smaller than desc_new

SELECT STRCMP(desc_new, desc_old) from update_desc;

I've struggled to replicate this in a fiddle but here is a .sql link to the DB should anyone want to test.

RiggsFolly
  • 93,638
  • 21
  • 103
  • 149
GenesisBits
  • 364
  • 2
  • 23

0 Answers0