Wordpress custom query failing
I'm creating a theme, with an admin page. In the admin page function, I have this line:
`$result1 = $wpdb->get_results("SELECT * FROM ".$table_name) or die(mysql_error()."wrong");`
In the admin page, "wrong" is printed. If I comment this line, everything works fine, except that I can't get those values. Before that, I also 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 works fine. I've tried everything, I can't get it to work.
Wordpress custom query failing
===

I'm creating a theme, with an admin page. In the admin page function, I have this line:
`$result1 = $wpdb->get_results("SELECT * FROM ".$table_name) or die(mysql_error()."wrong");`
In the admin page, "wrong" is printed. If I comment this line, everything works fine, except that I can't get those values. Before that, I also 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 works fine. I've tried everything, I can't get it to work.