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 '' at line 1 sql语句下面:
 string sql = "insert into stylist_vote_detail(WorkId,UserId,Ip,TimeDate) values(" + workid + "," + userid + ",'" + ip + "','" + DateTime.Now + "')";
            db.ExecNo(sql);