Set Css Style Via Javascript Substring Syntax In Mysql Query With If Condition