Jump to content

Query not returning right - there IS a match


kernelgpf

Recommended Posts

I am trying to run queries against a table and running into very confusing problems. I keep returning "0" rows for obvious matches - attached is a screenshot of an example (query+"no results" and picture of table with value being searched for (perfect match).

 

I've been pulling my hair out on this for hours - help and TIA!

post-22563-0-82430700-1376367395_thumb.png

I trimmed both values first, thanks anyway =/ nothing in the table will match properly - I'm actually writing a script to check against the incidentID and I started testing on the intersection field as well, something is wrong with the table I feel.

Trim would only handle spaces at the beginning and end of a string. It wouldn't help with any space variations in the middle of the string.

 

For instance if your database contained the value

1500  LA  BRANCH
(two spaces between words) your query would fail to match, even though it would appear as though it should when viewing the record in phpMyAdmin.

Okay I found the problem but am still unsure how to fix it - the string in the database has odd question mark black symbols - how can I remove them/unformat the string?

 

"�1�4�0�0� �W� �W�E�S�T� �L�P� �S� �7�0�0� �P�O�S�T� �O�A�K� �B�L�V�D��"

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.