Unknown column 'mac' in 'where clause'