Query Problem in Clustom Plugin

It looks like your SQL succeeded to me. So I guess your problem is that you’re getting an array of results (which is probably an array of arrays: rows, then columns per row) when you were expecting a single scalar value.

Try using get_var() to get a single value from the database:

$DBPresults = $wpdb->get_var( "SELECT name FROM $table_name WHERE id=1" );