Unknown column 'sitename' in 'where clause'
Sitename is a string, but you're not enclosing it in apostrophes, so SQL is interpreting it as a column. Please try adjusting like so:

"option_name='" . $value . "'"