Copy paste this code and change database connection.