How do WP know an image is a post thumbnail

It’ stored in the post meta table as _thumbnail_id.

The thumbnail is actually a “post” entry too, I think it’s stored as an “attachment” post type. So the _thumbnail_id meta value will be the ID which points to that attachment.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)