I’m trying to extract data from a MySQL server with PHP. The information has a date field like this YYYYMM (fx. 201108). My question is how would an SQL query look if I wanted to return the first or last half of a specific year? I have tired something like this, however the lessthan seems to be ignored:
SELECT * FROM `poster` WHERE mdr LIKE '2011%' AND mdr < '%06'
I’m afraid google havnt been much help for me.
you can do this, but not with VARCHAR or TEXT: