SELECT * FROM asset WHERE dor between YEAR(dor)= '2007' and YEAR(dor)= '2010';
ลองใส่ไปรันใน phpmyadmin
SQL query: Documentation
SELECT *
FROM asset
WHERE dor
BETWEEN YEAR( dor ) = '2007'
AND YEAR( dor ) = '2010'
LIMIT 0 , 30
MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= '2007' and YEAR( dor ) = '2010'
LIMIT 0, 30' at line 1