mysql - SQL Select - Where search term contains '.' -


i'm trying mysql select query on table looks bit this:

------------------------------- |  id  |  domain      | etc... |------+--------------+-------- |  1   |  dev.howmuch | |------+--------------+-------- |  2   |  devhowmuch  | 

at moment i'm trying simple

select * `tbl_swad_apps` `domain` = 'devhowmuch' 

which works fine, try

select * `tbl_swad_apps` `domain` = 'dev.howmuch' 

it returns no results, guessing it's trying treat fullstop wildcard or table reference (table.field).

how can query purely string? thanks

edit: appreciate guys none of these working: there no trailing or leading spaces. if try like '%howmuch%' both results turn up, if like '%.howmuch%' nothing comes up.

hex(domain) result requested:

1 dev.howmuch 646576a9686f776d756368 2 devhowmuch 646576686f776d756368 

the cell contains this:

d  e  v  .  h  o  w  m  u  c  h 64 65 76 a9 68 6f 77 6d 75 63 68 

full stop should 2e (it's 7-bit ascii character it's same byte in many encodings, including utf-8):

mysql> select hex('.'); +----------+ | hex('.') | +----------+ | 2e       | +----------+ 1 row in set (0.00 sec) 

but have a9. that's not 7-bit ascii character , don't know encoding data uses can't tell (but it's not dot). in iso-8859-1 , windows-1252 it'd copyright symbol (©). in utf-8 it'd invalid character, typically displayed replacement character (�) many clients.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -