Question: I am new to MySQL trigger. I want to make a trigger that before the update is made from my `emp_audit` table will check first if the `empno` from my employees table already exists. If it exists then do the update otherwise do nothing.

I encounter the following error:

> 
> Error 1064
> 
> 
> 

The code is:

```
DELIMITER $$

CREATE TRIGGER before_emp_audit_update
BEFORE UPDATE ON emp_audit
FOR EACH ROW BEGIN 

  IF (SELECT COUNT(*) FROM employees WHERE empno = NEW.empno) = 1
  THEN
  UPDATE INTO emp_audit
  SET ACTION = 'update',
  empno = NEW.empno,
  lastname = NEW.lastname,
  changedat = NOW();

  END IF;
END$$
DELIMITER;

```

Answer: 
Since SIFT patent expired, SIFT has been moved to the main repo.
To use SIFT in Opencv, You should use cv2.SIFT\_create() instead of cv2.xfeatures2d.SIFT\_create() now. (xfeatures2d only exists in the contrib package, but sift is part of the main package now.)

Below link will be helpful.
<https://github.com/opencv/opencv/issues/16736>
It may be due to a mismatch of opencv version and opencv-contrib version.
If you installed opencv from the source using CMake, and the source version is different from the version of opencv-contrib-python, uninstall the current opencv-contrib-python and do `pip install opencv-contrib-python==<version of the source>.X` or an another compatible version.
One version setup that I have running is opencv source (3.2), opencv-python (3.4.0.14) and opencv-contrib-python (3.4.2.17)