my friends.
I'm creating a custom php page on my wordpress website where I need to read and update a custom table. I'm using $wpdb class but I get no result when I use the table I create (the $result value stays null). With wordpress tables, it works fine and return the results. The problem is how to use my table...
This is everything that I tryed (the table name is wp_test):
$result = $wpdb->get_results("SELECT test_id, test_cli, test_URL FROM {$wpdb->wp_test}");
$result = $wpdb->get_results("SELECT test_id, test_cli, test_URL FROM {$wpdb->test}");
$result = $wpdb->get_results("SELECT test_id, test_cli, test_URL FROM $wpdb->wp_test");
$result = $wpdb->get_results("SELECT test_id, test_cli, test_URL FROM ``wp_test``");
(with only one backticks)
$result = $wpdb->get_results("SELECT test_id, test_cli, test_URL FROM wp_test");
If I use a wordpress table, it returns the values:
$result = $wpdb->get_results( "SELECT * FROM {$wpdb->posts} LIMIT 10" );
Please, can you help me?
Thanks!