How can one get page by pagename if it is a child page?

When you give a page a parent, the slug of the page becomes %parent-pagename%/%pagename%, so you should be able to target it with pagename=asia/afghanistan.

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