I am developing a theme, by having an admin page. Within the admin page function, I've this line:

$result1 = $wpdb->get_results("SELECT * FROM ".$table_name) 
or die(mysql_error()."wrong");

Within the admin page, "wrong" is printed. Basically comment this line, everything works fine, with the exception that I can not get individuals values. Before that, I additionally have this line:

$wpdb->query("CREATE TABLE IF NOT EXISTS ".$table_name." (
    id int NOT NULL AUTO_INCREMENT,
    url varchar (1023) NOT NULL,
    title varchar(511) NOT NULL,
    postpage varchar(511),
    link varchar(1023),
    PRIMARY KEY (id)
)") or die(mysql_error());

It really works fine. I have attempted everything, I can not get results.

Rather than using or die(), use $wpdb->print_error(); to print any errors that could have happened using the last query. So change

$result1 = $wpdb->get_results("SELECT * FROM ".$table_name) 
or die(mysql_error()."wrong");

to

$result1 = $wpdb->get_results("SELECT * FROM ".$table_name);
$wpdb->print_error();

See the codex entry for the wpdb class for more reference.