php - MySQL: <>1 works but =0 doesn't -


when send query like

select id private_messages to_id=1 , opened=0 

it doesn't return anything

select id private_messages to_id=1 , opened<>1 

returns results opened=0. opened columns type enum "1" , "0" (default) values. question is, why first query doesn't return anything?

since opened enum, should write:

select id private_messages to_id=1 , opened='0' 

enums set of possible strings. the documentation:

an enum string object value chosen list of permitted values enumerated explicitly in column specification @ table creation time.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -