wp-query, pull children of parent page

If it’s a child page, the post_parent will be a non-zero value, so you could check for that:

if( 0 == $post->post_parent ){
    // no parent, get children of this page
    $childargs['post_parent'] = $post->ID;
} else {
    // has parent, get children of parent page
    $childargs['post_parent'] = $post->post_parent;
}

This is assuming your child pages are just a single level below the parent pages. Otherwise, you can fetch all the ancestors of a page with get_post_ancestors, and get the ID of the highest level parent:

$parents = get_post_ancestors( $post->ID );
$top_level_page = $parents[ count($parents) - 1 ];

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