sql - MYSQL: clause where comparison Integer value -


this question has answer here:

i've got column int when request select clause id='1fr2' example, mysql return true record id=1 seems mysql ignore or convert ? solution force mysql not trim ? thanks.

this because of mysql converts string integer. takes first number(s) , truncate other string. solution cast id char first this:

where cast(id char)='1fr2' 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -