Find out if a page has no parent

http://codex.wordpress.org/Function_Reference/get_page

If post_parent is zero, you are there.

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