Jump to content

query returns no results


hyster

Recommended Posts

example of of my table

idname

file

info

14qwerty

bat.zip

blah

 

when i run the query

SELECT * FROM `obarep` WHERE FILE LIKE 'bat.zip'

 

it runs ok but no result is returned. if i use "not like" i get a result.

 

im assuming the . in bat.zip is causing the problems but i dont no were to go from here. i need the file name in the database.

 

 

Link to comment
https://forums.phpfreaks.com/topic/227624-query-returns-no-results/
Share on other sites

bat.zip will be a $var when its working but the $var didnt work so i used a fixed term just to get it working.

i tried = 'bat.zip' at first as i want an exact match.

i then tried 'like' and a few variations but it still would not work. i even tried like 'b' and other single letters and still nothing.

 

i could only get a result using 'not like'

How did the data value get inserted into your table? You likely have a new-line (cr/lf) or a null byte (zero) or even a space stored as part of the data.

 

You will need to find out what is causing the value in your column to not match the expected value you are using in your query.

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.