My subject field is (maybe) bigger than 100 characters. I want to use LENGTH if subject length is bigger that 100 char in below mysql command and attach ... to end of SUBSTR subject.
SELECT id ,
IF LENGTH(`subject`) <=100 then SUBSTR( `subject`, 1, 100 ) AS subject
ELSE `subject`
END IF
FROM `contents`